Commit 4df0efa2 by Anurag Ramdasan

decode uri component before redirect for safe redirect

parent f6b278e7
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
$('#login-form').on('ajax:success', function(event, json, xhr) { $('#login-form').on('ajax:success', function(event, json, xhr) {
if(json.success) { if(json.success) {
var u=decodeURI(window.location.search); var u=decodeURI(window.location.search);
next=u.split("next=")[1]; next=decodeURIComponent(u.split("next=")[1]);
if (next && !isExternal(next)) { if (next && !isExternal(next)) {
location.href=next; location.href=next;
} else if(json.redirect_url){ } else if(json.redirect_url){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment