urlencode query_string for magic auth to make sure GET params make it back

to the originating server
This commit is contained in:
zottel 2014-01-09 15:59:42 +01:00
parent c6b9e44353
commit cd65d172ba

View file

@ -1023,7 +1023,7 @@ function zid_init(&$a) {
dbesc($tmp_str)
);
// try to avoid recursion - but send them home to do a proper magic auth
$dest = '/' . $a->query_string;
$dest = '/' . urlencode($a->query_string);
$dest = str_replace(array('?zid=','&zid='),array('?rzid=','&rzid='),$dest);
if($r && ($r[0]['hubloc_url'] != z_root()) && (! strstr($dest,'/magic')) && (! strstr($dest,'/rmagic'))) {
goaway($r[0]['hubloc_url'] . '/magic' . '?f=&rev=1&dest=' . z_root() . $dest);
@ -1140,4 +1140,4 @@ function is_foreigner($s) {
function is_member($s) {
return((is_foreigner($s)) ? false : true);
}
}