Merge pull request #911 from Automattic/fix-sso-redirect-url

Encode SSO redirect URL as it may contain multiple query parameters
This commit is contained in:
Bruno Windels 2022-10-28 13:08:41 +00:00 committed by GitHub
commit c199d457e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,6 @@ export class SSOLoginHelper{
get homeserver(): string { return this._homeserver; }
createSSORedirectURL(returnURL: string): string {
return `${this._homeserver}/_matrix/client/r0/login/sso/redirect?redirectUrl=${returnURL}`;
return `${this._homeserver}/_matrix/client/r0/login/sso/redirect?redirectUrl=${encodeURIComponent(returnURL)}`;
}
}