mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-04-18 19:49:30 +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() {
|
||||
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}}';
|
||||
|
|
Loading…
Add table
Reference in a new issue