mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add pasword hashing to API user modification
This commit is contained in:
parent
54ff888002
commit
9a9d101015
@ -280,7 +280,10 @@ class ApiUsersUserIndexHandler(BaseApiHandler):
|
||||
if len(data) != 0:
|
||||
for key in data:
|
||||
# If we don't validate the input there could be security issues
|
||||
setattr(user_obj, key, data[key])
|
||||
value = data[key]
|
||||
if key == "password":
|
||||
value = self.helper.encode_pass(value)
|
||||
setattr(user_obj, key, value)
|
||||
user_obj.save()
|
||||
|
||||
self.controller.management.add_to_audit_log(
|
||||
|
Loading…
Reference in New Issue
Block a user