Harden release console token bootstrap
This commit is contained in:
@@ -768,11 +768,15 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const token = params.get("token") || sessionStorage.getItem("releaseConsoleToken") || "";
|
||||
const fragmentParams = new URLSearchParams(window.location.hash.slice(1));
|
||||
const fragmentToken = fragmentParams.get("token") || "";
|
||||
const token = fragmentToken || sessionStorage.getItem("releaseConsoleToken") || "";
|
||||
if (token) {
|
||||
sessionStorage.setItem("releaseConsoleToken", token);
|
||||
}
|
||||
if (fragmentToken) {
|
||||
history.replaceState(null, document.title, `${window.location.pathname}${window.location.search}`);
|
||||
}
|
||||
|
||||
const elements = {
|
||||
channel: document.getElementById("channel"),
|
||||
|
||||
Reference in New Issue
Block a user