Itamar Heim has submitted this change and it was merged.
Change subject: restapi: Validate unsigned short integers correctly
......................................................................
restapi: Validate unsigned short integers correctly
Recently, in commit 14e9da, we introduced a validation of integer values
provided to the RESTAPI in order to avoid overflows of Java integer
types. This validation doesn't work correctly for unsigned short
integers, as it compares them to the maximum signed short integer. This
has the side effect of rejecting requests that include port numbers
greater than 32767. A notable example is the VDSM port number 54321.
This patch changes the validation so that it will validate unsigned
short integers correctly, comparing them to 65535.
Change-Id: I49e64d5f55c32463950e648aa1cd8c3084017da6
Bug-Url:
https://bugzilla.redhat.com/1000796
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
---
M
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/utils/IntegerParser.java
M backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
2 files changed, 54 insertions(+), 18 deletions(-)
Approvals:
Ravi Nori: Verified
Juan Hernandez: Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/23950
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I49e64d5f55c32463950e648aa1cd8c3084017da6
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Ravi Nori <rnori(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server