-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPCC-30455 Fix a bug when trying to validate empty host #17912
HPCC-30455 Fix a bug when trying to validate empty host #17912
Conversation
When File Upload dialog box is displayed in a containerized environment, it sends a FileList request with an empty Netaddr to ESP FileSpray service. The service should not validate the Netaddr. Signed-off-by: wangkx <[email protected]>
https://track.hpccsystems.com/browse/HPCC-30455 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangkx - approved, but 1 question.
if (!isEmptyString(hostToCheck) && !isHostInPlane(dropZone, hostToCheck, isIPAddress(hostToCheck))) | ||
throw makeStringExceptionV(ECLWATCH_INVALID_INPUT, "The host '%s' is not valid for dropzone %s.", host, dropZoneName); | ||
if (!isEmptyString(pathToCheck) && !isPathInPlane(dropZone, pathToCheck)) | ||
throw makeStringExceptionV(ECLWATCH_INVALID_INPUT, "The path '%s' is not valid for dropzone %s.", path, dropZoneName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks ok, and improves the error reporting,
but using validateDropZone was problematic because hostToCheck was not null, but was empty?
If so, validateDropZone should probably be changed too, changing if (host) to if (!isEmptyString(host))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but using validateDropZone was problematic because hostToCheck was not null, but was empty?
Yes.
If so, validateDropZone should probably be changed too, changing if (host) to if (!isEmptyString(host))
I was wondering why the validateDropZone() uses 'if (host)' not 'if (!isEmptyString(host))'. I will create another JIRA to change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangkx looks good
@ghalliday please merge |
When File Upload dialog box is displayed in a containerized environment, it sends a FileList request with an empty Netaddr to ESP FileSpray service. The service should not validate the Netaddr.
Type of change:
Checklist:
Smoketest:
Testing: