PHP 4.0 Bug #7253: URL rewriter causing problems
| From: | sean at fojar dot com | Date: | Mon, 16 Oct 2000 17:14:00 +0000 |
| Subject: | PHP 4.0 Bug #7253: URL rewriter causing problems | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-35159@lists.php.net to get a copy of this message | ||
From: sean@fojar.com
Operating system: RH Linux 6.2 kernel 2.2.16
PHP version: 4.0.3pl1
PHP Bug Type: *Session related
Bug description: URL rewriter causing problems
The fact that the URL rewriter for transparent session ID propagation now apparently replaces single
quotes with double quotes and appends the session ID to IMG tags is causing problems with
JavaScript.
For example, the line:
var x = "<img src='test.jpg'>";
is re-written as:
var x = "<img src="test.jpg?PHPSESSID=blah">";
and the browser's JavaScript interpreter thinks that the question mark indicates a conditional.
If I try and use escaped doublequotes instead, i.e.:
var x = "<img src=\"test.jpg\">";
it is re-written as:
var x = "<img src="\?PHPSESSID=blah""test.jpg\">";
This happens with PHP 4.0.3 and 4.0.3pl2. I'm using apache 1.3.14 and mod_ssl 2.7.0 compiled
against OpenSSL 0.9.6.
I'm using the stock php.ini-optimized, the only things I've changed in it are the Register
Globals option (turned it on), the include_path (set it to /usr/local/apache/htdocs/include), and
session.use_trans_sid (turned it on).
This bug creates JavaScript errors in both Netscape and IE.
--
Edit Bug report at: http://bugs.php.net/?id=7253&edit=1