View Single Post
Old 01-21-2004, 10:57 AM   #11
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote