Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Use v3 endpoints for fallback auth (Matrix 1.1) #12019

Merged
merged 2 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions changelog.d/12019.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use Matrix v1.1 endpoints (`/_matrix/client/v3/auth/...`) in fallback auth HTML forms.
8 changes: 4 additions & 4 deletions synapse/rest/client/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def on_GET(self, request: SynapseRequest, stagetype: str) -> None:
if stagetype == LoginType.RECAPTCHA:
html = self.recaptcha_template.render(
session=session,
myurl="%s/r0/auth/%s/fallback/web"
myurl="%s/v3/auth/%s/fallback/web"
% (CLIENT_API_PREFIX, LoginType.RECAPTCHA),
sitekey=self.hs.config.captcha.recaptcha_public_key,
)
Expand All @@ -74,7 +74,7 @@ async def on_GET(self, request: SynapseRequest, stagetype: str) -> None:
self.hs.config.server.public_baseurl,
self.hs.config.consent.user_consent_version,
),
myurl="%s/r0/auth/%s/fallback/web"
myurl="%s/v3/auth/%s/fallback/web"
% (CLIENT_API_PREFIX, LoginType.TERMS),
)

Expand Down Expand Up @@ -118,7 +118,7 @@ async def on_POST(self, request: Request, stagetype: str) -> None:
# Authentication failed, let user try again
html = self.recaptcha_template.render(
session=session,
myurl="%s/r0/auth/%s/fallback/web"
myurl="%s/v3/auth/%s/fallback/web"
% (CLIENT_API_PREFIX, LoginType.RECAPTCHA),
sitekey=self.hs.config.captcha.recaptcha_public_key,
error=e.msg,
Expand All @@ -143,7 +143,7 @@ async def on_POST(self, request: Request, stagetype: str) -> None:
self.hs.config.server.public_baseurl,
self.hs.config.consent.user_consent_version,
),
myurl="%s/r0/auth/%s/fallback/web"
myurl="%s/v3/auth/%s/fallback/web"
% (CLIENT_API_PREFIX, LoginType.TERMS),
error=e.msg,
)
Expand Down