Fix getOidcCallbackUrl for Element Desktop (#29711)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
bcd396e19e
commit
c929eedd81
@@ -479,7 +479,7 @@ export default class ElectronPlatform extends BasePlatform {
|
|||||||
const url = super.getOidcCallbackUrl();
|
const url = super.getOidcCallbackUrl();
|
||||||
url.protocol = "io.element.desktop";
|
url.protocol = "io.element.desktop";
|
||||||
// Trim the double slash into a single slash to comply with https://datatracker.ietf.org/doc/html/rfc8252#section-7.1
|
// Trim the double slash into a single slash to comply with https://datatracker.ietf.org/doc/html/rfc8252#section-7.1
|
||||||
if (url.href.startsWith(`${url.protocol}://`)) {
|
if (url.href.startsWith(`${url.protocol}//`)) {
|
||||||
url.href = url.href.replace("://", ":/");
|
url.href = url.href.replace("://", ":/");
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
|
|||||||
Reference in New Issue
Block a user