Skip to content

Commit

Permalink
fix: encode redirect query parameter in js
Browse files Browse the repository at this point in the history
  • Loading branch information
ymarcon committed Jun 2, 2024
1 parent ed9a577 commit f4fe7d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions agate-webapp/src/main/webapp/assets/js/agate.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var agatejs = (function() {
const q = new URLSearchParams(window.location.search);
if (q.get('redirect')) {
// verify redirect
redirect = normalizeUrl('/check?redirect=') + q.get('redirect');
redirect = normalizeUrl('/check?redirect=') + encodeURIComponent(q.get('redirect'));
}
window.location = redirect;
})
Expand Down Expand Up @@ -106,7 +106,7 @@ var agatejs = (function() {
let values = {};
const q = new URLSearchParams(window.location.search);
if (q.get('redirect')) {
redirect = normalizeUrl('/check?redirect=') + q.get('redirect');
redirect = normalizeUrl('/check?redirect=') + encodeURIComponent(q.get('redirect'));
window.location = redirect;
} else if (realmField) {
redirect = normalizeUrl('/just-registered');
Expand Down Expand Up @@ -201,7 +201,7 @@ var agatejs = (function() {
let redirect = normalizeUrl('/');
const q = new URLSearchParams(window.location.search);
if (q.get('redirect')) {
redirect = normalizeUrl('/check?redirect=') + q.get('redirect');
redirect = normalizeUrl('/check?redirect=') + encodeURIComponent(q.get('redirect'));
}
window.location = redirect;
})
Expand Down

0 comments on commit f4fe7d6

Please sign in to comment.