mirror of
https://github.com/swissmakers/wireguard-manager.git
synced 2026-04-01 08:47:07 +02:00
[Vulnerability] Cross site scripting (XSS) and Open Redirect on the login page (#396)
This commit is contained in:
@@ -84,7 +84,7 @@
|
|||||||
function redirectNext() {
|
function redirectNext() {
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
const nextURL = urlParams.get('next');
|
const nextURL = urlParams.get('next');
|
||||||
if (nextURL) {
|
if (nextURL && /(?:^\/[a-zA-Z_])|(?:^\/$)/.test(nextURL.trim())) {
|
||||||
window.location.href = nextURL;
|
window.location.href = nextURL;
|
||||||
} else {
|
} else {
|
||||||
window.location.href = '/{{.basePath}}';
|
window.location.href = '/{{.basePath}}';
|
||||||
|
|||||||
Reference in New Issue
Block a user