- priority: 5 --> 6
I'm using PHPLib 7.4pre1 with PHP 4.2.0(maybe latest
version at now).
$sess->purl() method in login.ihtml outputs the extra
string `?\1' when session id is only included in
$QUERY_STRING.
For example, the following code is written.
.../login.php?\1
This problem is caused by ereg_replace function in PHP
4.2.0. In 4.1.2, \\digit(back-references) is replaced
to "" when referenced string is "", but in 4.2.0
replaced to `\digit'.
The following is the part of get_id() method in Session
class.
// Remove session ID info from QUERY String - it is in
cookie
if ( isset($QUERY_STRING) && ("" != $QUERY_STRING) ) {
$QUERY_STRING = ereg_replace(
"(^|&)".quotemeta(urlencode($this->name))."=".$id."(&|$)",
"\\1", $QUERY_STRING);
}
Finally, I added the the following code fragment:
$QUERY_STRING = ereg_replace("\\\\1", "",
$QUERY_STRING);
Of cource, this is not a bug. I think that this is a
effet of multi-byte extension to regexp feature in PHP.