mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-27 19:08:31 +08:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
7d20bd4d06
@ -474,10 +474,8 @@ export default class ElectronPlatform extends BasePlatform {
|
||||
const url = super.getOidcCallbackUrl();
|
||||
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
|
||||
// Chrome seems to have a strange issue where non-standard protocols prevent URL object mutations on pathname
|
||||
// field, so we cannot mutate `pathname` reliably and instead have to rewrite the href manually.
|
||||
if (url.pathname.startsWith("//")) {
|
||||
url.href = url.href.replace(url.pathname, url.pathname.slice(1));
|
||||
if (url.href.startsWith(`${url.protocol}://`)) {
|
||||
url.href = url.href.replace("://", ":/");
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user