Change in ovirt-engine[master]: restapi: Validate unsigned short integers correctly

Juan Hernandez 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 Signed-off-by: Juan Hernandez <juan.hernandez@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: Looks good to me, but someone else must approve Juan Hernandez: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/23934 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49e64d5f55c32463950e648aa1cd8c3084017da6 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Ravi Nori <rnori@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server
participants (1)
-
juan.hernandez@redhat.com