Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api_views/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ def update_password(username):
else:
if request_data.get('password'):
if vuln: # Unauthorized update of password of another user
if username != resp.get('sub'):
return Response(error_message_helper("You are not authorized to change the password of another user"),
403, mimetype="application/json")
user = User.query.filter_by(username=username).first()
if user:
user.password = request_data.get('password')
Expand Down
Loading