git subrepo commit mailcow/src/mailcow-dockerized
subrepo: subdir: "mailcow/src/mailcow-dockerized"
merged: "308860af"
upstream: origin: "https://github.com/mailcow/mailcow-dockerized.git"
branch: "master"
commit: "3f1a5af8"
git-subrepo: version: "0.4.5"
origin: "???"
commit: "???"
Change-Id: I5d51c14b45db54fe706be40a591ddbfcea50d4b0
diff --git a/mailcow/src/mailcow-dockerized/data/web/api/oauth2-redirect.html b/mailcow/src/mailcow-dockerized/data/web/api/oauth2-redirect.html
index 64b171f..5640917 100644
--- a/mailcow/src/mailcow-dockerized/data/web/api/oauth2-redirect.html
+++ b/mailcow/src/mailcow-dockerized/data/web/api/oauth2-redirect.html
@@ -13,7 +13,7 @@
var isValid, qp, arr;
if (/code|token|error/.test(window.location.hash)) {
- qp = window.location.hash.substring(1);
+ qp = window.location.hash.substring(1).replace('?', '&');
} else {
qp = location.search.substring(1);
}
@@ -38,7 +38,7 @@
authId: oauth2.auth.name,
source: "auth",
level: "warning",
- message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
+ message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
});
}
@@ -58,7 +58,7 @@
authId: oauth2.auth.name,
source: "auth",
level: "error",
- message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
+ message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
});
}
} else {
@@ -67,9 +67,13 @@
window.close();
}
- window.addEventListener('DOMContentLoaded', function () {
- run();
- });
+ if (document.readyState !== 'loading') {
+ run();
+ } else {
+ document.addEventListener('DOMContentLoaded', function () {
+ run();
+ });
+ }
</script>
</body>
</html>