Hi. Thanks, good idea. You might also try the following.
In phpdigRewriteUrl, comment out your adamize function call, and replace the following:
Code:
// parse and remove quotes
$url = preg_replace('/[\0]/is','',$url); // remove null byte
$url = preg_replace('/[\\']/is','',$url); // remove single quote
$url = preg_replace('/["]/is','',$url); // remove double quote
$url = preg_replace('/[\\\\]/is','',$url); // remove backslash
$url = @parse_url(str_replace('\\'"','',$eval));
if (!isset($url['path'])) {
$url['path'] = '';
}
with the following:
Code:
// parse and remove quotes
$eval = preg_replace('/[\0]/is','',$eval); // remove null byte
$eval = preg_replace('/[\\']/is','',$eval); // remove single quote
$eval = preg_replace('/["]/is','',$eval); // remove double quote
$eval = preg_replace('/[\\\\]/is','',$eval); // remove backslash
if (PHPDIG_SESSID_REMOVE) {
$eval = ereg_replace(PHPDIG_SESSID_VAR.'=[a-z0-9]*','',$eval);
$eval = str_replace("&&","&",$eval);
$eval = eregi_replace("[?][&]","?",$eval);
$eval = eregi_replace("&$","",$eval);
}
$url = @parse_url(str_replace('\\'"','',$eval));
if (!isset($url['path'])) {
$url['path'] = '';
}
This should do two things: (a) fix the typo of using $url instead of $eval in the function and (b) make it so any PHPDIG_SESSID_VAR is stripped from the URL regardless of placement if PHPDIG_SESSID_REMOVE is set to true.