decode uri component before redirect for safe redirect

This commit is contained in:
Anurag Ramdasan
2014-06-11 19:04:16 +00:00
parent f6b278e7f8
commit 4df0efa250

View File

@@ -51,7 +51,7 @@
$('#login-form').on('ajax:success', function(event, json, xhr) {
if(json.success) {
var u=decodeURI(window.location.search);
next=u.split("next=")[1];
next=decodeURIComponent(u.split("next=")[1]);
if (next && !isExternal(next)) {
location.href=next;
} else if(json.redirect_url){