Skip to content

Commit

Permalink
[Vulnerability] Cross site scripting (XSS) and Open Redirect on the l…
Browse files Browse the repository at this point in the history
…ogin page (#396)
  • Loading branch information
catmandx authored Jun 23, 2023
1 parent 28f3e82 commit 6bbe230
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -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}}';
Expand Down

0 comments on commit 6bbe230

Please sign in to comment.