Add pasword hashing to API user modification

This commit is contained in:
luukas 2022-05-25 00:32:31 +03:00
parent 54ff888002
commit 9a9d101015
No known key found for this signature in database
GPG Key ID: CC4915E8D71FC044

View File

@ -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(