fix: sanitise redirect_to for already logged-in instances
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
parent
bd537301ac
commit
174b9ed09f
1 changed files with 2 additions and 2 deletions
|
|
@ -183,7 +183,7 @@ login.login_handlers = (function() {
|
|||
login.set_indicator('{{ _("Success") }}', 'green');
|
||||
window.location.href = frappe.utils.sanitise_redirect(frappe.utils.get_url_arg("redirect-to")) || data.home_page;
|
||||
} else if(data.message == 'Password Reset'){
|
||||
window.location.href = data.redirect_to;
|
||||
window.location.href = frappe.utils.sanitise_redirect(data.redirect_to);
|
||||
} else if(data.message=="No App") {
|
||||
login.set_indicator("{{ _("Success") }}", 'green');
|
||||
if(localStorage) {
|
||||
|
|
@ -194,7 +194,7 @@ login.login_handlers = (function() {
|
|||
}
|
||||
|
||||
if(data.redirect_to) {
|
||||
window.location.href = data.redirect_to;
|
||||
window.location.href = frappe.utils.sanitise_redirect(data.redirect_to);
|
||||
}
|
||||
|
||||
if(last_visited && last_visited != "/login") {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue