Bug 1654743

Summary: API accepts password of zero length
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Elena Bondarenko <ebondare>
Component: web-admin-tendrl-apiAssignee: Neha Gupta <negupta>
Status: CLOSED WONTFIX QA Contact: sds-qe-bugs
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.4CC: gshanmug, rhs-bugs, sankarshan
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-08 15:31:17 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:
Bug Depends On: 1654623    
Bug Blocks:    

Description Elena Bondarenko 2018-11-29 15:08:15 UTC
Description of problem:

It's possible to change password to empty string using API. The password of zero length shouldn't be accepted by any API endpoint.


Version-Release number of selected component (if applicable):

tendrl-api-1.6.3-8.el7rhgs.noarch


How reproducible:

100%


Steps to Reproduce:

1. Create a user with valid password
2. Change user's password to empty string


Actual results:

The user's password is changed to empty string


Expected results:

WA api will refuse to perform the action if the new password is an empty string.

Comment 3 Elena Bondarenko 2018-11-30 08:18:49 UTC
> Does the API do validation of the password characteristics?
The API checks the length of the password and doesn't allow passwords of length 1-8 or greater than 128 characters, as was required in BZ https://bugzilla.redhat.com/show_bug.cgi?id=1610947
However, empty string is accepted as a password when user details are being edited.