mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-24 20:19:21 -05:00
Fix change_password
This commit is contained in:
parent
69adf8c384
commit
c43b6dcc75
@ -56,10 +56,9 @@ class PasswordRestServlet(RestServlet):
|
|||||||
if LoginType.PASSWORD in result:
|
if LoginType.PASSWORD in result:
|
||||||
# if using password, they should also be logged in
|
# if using password, they should also be logged in
|
||||||
requester = yield self.auth.get_user_by_req(request)
|
requester = yield self.auth.get_user_by_req(request)
|
||||||
requester_user_id = requester.user.to_string()
|
user_id = requester.user.to_string()
|
||||||
if requester_user_id.to_string() != result[LoginType.PASSWORD]:
|
if user_id != result[LoginType.PASSWORD]:
|
||||||
raise LoginError(400, "", Codes.UNKNOWN)
|
raise LoginError(400, "", Codes.UNKNOWN)
|
||||||
user_id = requester_user_id
|
|
||||||
elif LoginType.EMAIL_IDENTITY in result:
|
elif LoginType.EMAIL_IDENTITY in result:
|
||||||
threepid = result[LoginType.EMAIL_IDENTITY]
|
threepid = result[LoginType.EMAIL_IDENTITY]
|
||||||
if 'medium' not in threepid or 'address' not in threepid:
|
if 'medium' not in threepid or 'address' not in threepid:
|
||||||
|
Loading…
Reference in New Issue
Block a user