mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-04-19 19:59:13 +03:00
[Vulnerability] Cross site scripting (XSS) and Open Redirect on the login page (#396)
This commit is contained in:
parent
28f3e820f0
commit
6bbe230fe8
1 changed files with 1 additions and 1 deletions
|
@ -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}}';
|
||||||
|
|
Loading…
Add table
Reference in a new issue