mirror of
https://github.com/swissmakers/wireguard-manager.git
synced 2026-03-26 13:03:28 +01: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() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const nextURL = urlParams.get('next');
|
||||
if (nextURL) {
|
||||
if (nextURL && /(?:^\/[a-zA-Z_])|(?:^\/$)/.test(nextURL.trim())) {
|
||||
window.location.href = nextURL;
|
||||
} else {
|
||||
window.location.href = '/{{.basePath}}';
|
||||
|
||||
Reference in New Issue
Block a user