[AAA-120] idmtool doesn't handle invalid user input Created: 30/Mar/17  Updated: 21/Nov/19  Resolved: 21/Nov/19

Status: Resolved
Project: aaa
Component/s: General
Affects Version/s: None
Fix Version/s: Magnesium, Sodium SR2, Neon SR3

Type: Bug
Reporter: Kevin Wang Assignee: Venkatrangan Govindarajan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 8119

 Description   

The existing idmtool doesn't really read the response of the HTTP request it makes. For example, if you do "./idmtool admin change-password xxx", where xxx is an invalid user id. The server returns an error with message "user not found". However, the idmtool doesn't check the message but assuming the userid is correct, so it will throw exception as expected fields are not there:

bin/idmtool admin change-password user
Password:
Traceback (most recent call last):
File "./idmtool", line 313, in <module>
change_password(user, password, args.userid[0])
File "./idmtool", line 228, in change_password
del existing['salt']
KeyError: 'salt'


Generated at Wed Feb 07 19:08:41 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.