Daniel Erez has submitted this change and it was merged.
Change subject: restapi: a potential NPE when a user invokes actions
......................................................................
restapi: a potential NPE when a user invokes actions
When a user invokes an action without sending filter=true property,
the action may throw a NPE on command creation flow.
The underlining issue is in AbstractBackendCollectionResource
-> resolveCreated method. If an exception is thrown (e.g. due to
lack of permissions to execute query), the method returns null.
Instead of tolerating the exception, call handleError method
(to output a proper error message).
Change-Id: I55f5ae906d6c0d2023783e7b61abe3bf9d01f28f
Bug-Url:
https://bugzilla.redhat.com/915106
Signed-off-by: Daniel Erez <derez(a)redhat.com>
---
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCollectionResource.java
1 file changed, 2 insertions(+), 5 deletions(-)
Approvals:
Daniel Erez: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/15394
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I55f5ae906d6c0d2023783e7b61abe3bf9d01f28f
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpastern(a)redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>