#23827 [NEW]: trans sid don't takes care about MIME type of generated content
| From: | flying at dom dot natm dot ru | Date: | Tue, 27 May 2003 08:49:36 +0000 |
| Subject: | #23827 [NEW]: trans sid don't takes care about MIME type of generated content | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-40489@lists.php.net to get a copy of this message | ||
From: flying at dom dot natm dot ru
Operating system: All
PHP version: 4.3.1
PHP Bug Type: Session related
Bug description: trans sid don't takes care about MIME type of generated content
When enable-trans-sid is ON in php.ini - PHP transforms all generated
contents, regardless of its actual type, but it should only do it for HTML
(XHTML, WML and so on) contents.
For example take a look at this example:
<?php
header('Content-type: text/plain');
session_start();
echo '<html><body><a
href="test.php">test</a></body></html>';
?>
Generated content is HTML, but actual type of generated content is
text/plain and hence it have nothing to do with sessions. But content
transformation still occurs and resulted output is:
<html><body><a
href="test.php?PHPSESSID=135a5afcbbf97014a56caf4bd8c4200b">test</a></body></html>
instead of expected:
<html><body><a href="test.php">test</a></body></html>
Even more interesting things may appear when somebody will try to output
som mixed code+text content when there will be something like HTML link.
Suggested way to fix is to add a parameter to php.ini where will be
listed MIME types of content, which should be transformed.
--
Edit bug report at http://bugs.php.net/?id=23827&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23827&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23827&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23827&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23827&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23827&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23827&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23827&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23827&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23827&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23827&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23827&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23827&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23827&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23827&r=gnused