added defense against script injection via cookie setter [#24981847]
parent
89e6afe82c
commit
514550ea69
|
@ -18,6 +18,7 @@ $j(document).ready(function() {
|
||||||
var next = getQueryVariable('next');
|
var next = getQueryVariable('next');
|
||||||
var saved_next = $j.cookie('next');
|
var saved_next = $j.cookie('next');
|
||||||
if(next!=null) {
|
if(next!=null) {
|
||||||
|
next = next.replace(/[\x22\x27\x3c\x3e]/g,'');
|
||||||
$j.cookie('next', next, {path: '/'});
|
$j.cookie('next', next, {path: '/'});
|
||||||
} else if(saved_next!=null){
|
} else if(saved_next!=null){
|
||||||
$j('#link-to-next').html("<a href='"+saved_next+"'> Click to continue after logging in...</a>");
|
$j('#link-to-next').html("<a href='"+saved_next+"'> Click to continue after logging in...</a>");
|
||||||
|
|
Loading…
Reference in New Issue