Change in ovirt-engine[ovirt-engine-3.4]: restapi : ints and shorts overflow

iheim at redhat.com iheim at redhat.com
Mon Feb 3 19:39:44 UTC 2014


Itamar Heim has submitted this change and it was merged.

Change subject: restapi : ints and shorts overflow
......................................................................


restapi : ints and shorts overflow

int and short values are overflown before
they even reach the business code, allowing
for wrong values to be set.

When posting to rest api, if the value of an
int is greater than Integer.MAX_VALUE or value
of a short is larger than Short.MAX_VALUE. The
values are overflown when values are unmarshalled
using JAXB.

An excpetion should be raised during JAXB
unmarshalling to indicate that the value is
greater than the MAX_VALUE for the type.

Change-Id: I9d0be6f3f220d7a5f58bb47906a8565d80e0ebf0
Bug-Url: https://bugzilla.redhat.com/1000796
Signed-off-by: Ravi Nori <rnori at redhat.com>
---
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/utils/IntegerParser.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/utils/InvalidValueException.java
M backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
M backend/manager/modules/restapi/jaxrs/pom.xml
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/BackendApplication.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/validation/InvalidValueExceptionMapper.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/validation/XmlMessageBodyReader.java
M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/VmMapperTest.java
8 files changed, 151 insertions(+), 8 deletions(-)

Approvals:
  Ravi Nori: Verified
  Juan Hernandez: Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/23949
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d0be6f3f220d7a5f58bb47906a8565d80e0ebf0
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Ravi Nori <rnori at redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list