Change in ovirt-engine[master]: restapi: a potential NPE when a user invokes actions

derez at redhat.com derez at redhat.com
Tue Jun 25 07:42:21 UTC 2013


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 at 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 at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpastern at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>



More information about the Engine-commits mailing list