Bug 1751173

Summary: RHDS WebUI - Need to validate the port number when creating a suffix referral.
Product: Red Hat Directory Server Reporter: Têko Mihinto <tmihinto>
Component: cockpit-389-dsAssignee: mreynolds
Status: CLOSED ERRATA QA Contact: RHDS QE <ds-qe-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 11.0CC: afarley, lkrispen, mhonek, pasik, spichugi, tbordaz, vashirov
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 389-ds-base-1.4.1.9-1.module+el8dsrv+4243+ba0eb3c6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-06 12:42:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Têko Mihinto 2019-09-11 10:35:15 UTC
Description of problem:
One can create a suffix referral with an invalid port number for the referred LDAP server.

Version-Release number of selected component (if applicable):
# rpm -qa | grep 389-ds
389-ds-base-1.4.1.8-1.module+el8dsrv+4209+f45880df.x86_64
389-ds-base-libs-1.4.1.8-1.module+el8dsrv+4209+f45880df.x86_64
cockpit-389-ds-1.4.1.8-1.module+el8dsrv+4209+f45880df.noarch
#

How reproducible:
Always.

Steps to Reproduce:
1. Create a suffix
2. Select the "Database" tab and choose a suffix
3. Click on "Create Referral"
4. Use invalid characters for the port number
5. Click on "Create Referral". The suffix referral will be created with the invalid port number.

Actual results:
Invalid referral ( incorrect port number ) is created.

Expected results:
Prevent the user to create invalid referral.

Additional info:

Comment 3 Viktor Ashirov 2019-10-29 21:41:21 UTC
Builds tested:
389-ds-base-1.4.1.9-1.module+el8dsrv+4243+ba0eb3c6.x86_64
cockpit-389-ds-1.4.1.9-1.module+el8dsrv+4243+ba0eb3c6.noarch

When I enter letters instead of numbers, and then save the referral, I get the error message:
Invalid port number, please use a number between 1 and 65535

I think we should not accept non-numeric characters in the first place. But that can be done as part of ReactJS refactor.

Marking as VERIFIED.

Comment 5 errata-xmlrpc 2019-11-06 12:42:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:3731