Fixed
Details
Assignee
Benjamin ReedBenjamin ReedReporter
David SchlenkDavid SchlenkComponents
Sprint
NoneFix versions
Affects versions
Priority
Minor
Details
Details
Assignee
Benjamin Reed
Benjamin ReedReporter
David Schlenk
David SchlenkComponents
Sprint
None
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created March 18, 2014 at 7:00 PM
Updated July 22, 2020 at 6:42 PM
Resolved July 22, 2020 at 6:42 PM
The ReST interface doesn't encrypt or hash the password you supply via POST when creating a user. The WebUI obviously does this for you, and I can't imagine why you wouldn't want the REST API to do it for you as well so here's a patch. Even respects the salt attribute to preserve the ability to use the old crappy uppercase MD5 algorithm.
To accomplish this I'm using UserManager.saveUser(String name, User details) rather than UserManager.save(OnmsUser user). I suppose the same could be accomplished by modifying UserManager.save(OnmsUser user) but I didn't want to mess with that in case something else depended on that functionality.
Includes the appropriate change to the unit test.