Juan Hernandez 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(a)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: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/23856
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9d0be6f3f220d7a5f58bb47906a8565d80e0ebf0
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rnori(a)redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server