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

This commit is contained in:
Travis Ralston 2022-02-22 04:20:45 -07:00 committed by GitHub
parent 3070af4809
commit d7cb0dcbaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

1
changelog.d/12019.misc Normal file
View file

@ -0,0 +1 @@
Use Matrix v1.1 endpoints (`/_matrix/client/v3/auth/...`) in fallback auth HTML forms.

View file

@ -62,7 +62,7 @@ class AuthRestServlet(RestServlet):
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,
)
@ -74,7 +74,7 @@ class AuthRestServlet(RestServlet):
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),
)
@ -118,7 +118,7 @@ class AuthRestServlet(RestServlet):
# 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,
@ -143,7 +143,7 @@ class AuthRestServlet(RestServlet):
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,
)