Skip to content
Snippets Groups Projects
Unverified Commit dc7f068d authored by reivilibre's avatar reivilibre Committed by GitHub
Browse files

Fix a long-standing bug where Synapse would not unbind third-party identifiers...

Fix a long-standing bug where Synapse would not unbind third-party identifiers for Application Service users when deactivated and would not emit a compliant response. (#16617)

* Don't skip unbinding 3PIDs and returning success status when deactivating AS user

Fixes #16608

* Newsfile

Signed-off-by: default avatarOlivier Wilkinson (reivilibre) <oliverw@matrix.org>

---------

Signed-off-by: default avatarOlivier Wilkinson (reivilibre) <oliverw@matrix.org>
parent bc4372ad
No related branches found
No related tags found
No related merge requests found
Fix a long-standing bug where Synapse would not unbind third-party identifiers for Application Service users when deactivated and would not emit a compliant response.
\ No newline at end of file
...@@ -299,19 +299,16 @@ class DeactivateAccountRestServlet(RestServlet): ...@@ -299,19 +299,16 @@ class DeactivateAccountRestServlet(RestServlet):
requester = await self.auth.get_user_by_req(request) requester = await self.auth.get_user_by_req(request)
# allow ASes to deactivate their own users # allow ASes to deactivate their own users:
if requester.app_service: # ASes don't need user-interactive auth
await self._deactivate_account_handler.deactivate_account( if not requester.app_service:
requester.user.to_string(), body.erase, requester await self.auth_handler.validate_user_via_ui_auth(
requester,
request,
body.dict(exclude_unset=True),
"deactivate your account",
) )
return 200, {}
await self.auth_handler.validate_user_via_ui_auth(
requester,
request,
body.dict(exclude_unset=True),
"deactivate your account",
)
result = await self._deactivate_account_handler.deactivate_account( result = await self._deactivate_account_handler.deactivate_account(
requester.user.to_string(), body.erase, requester, id_server=body.id_server requester.user.to_string(), body.erase, requester, id_server=body.id_server
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment