Bug #74892 [NEW]: Url Rewriting (trans_sid) not working on urls that start with #

From: Date: Mon, 10 Jul 2017 14:30:07 +0000
Subject: Bug #74892 [NEW]: Url Rewriting (trans_sid) not working on urls that start with #
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209961@lists.php.net to get a copy of this message
From: drchuck at gmail dot com Operating system: Mac OS/X PHP version: 7.1.7 Package: Session related Bug Type: Bug Bug description:Url Rewriting (trans_sid) not working on urls that start with # Description: ------------ When there is a URL that starts with "#" in an anchor tag, PHP 7.1.1 still adds the PHPSESSID parameter like this: <p><a href="index.php?PHPSESSID=a17309afea8f2791078fc046cce5fa56">Click This Anchor Tag!</a></p> <p><a href="#place/?PHPSESSID=a17309afea8f2791078fc046cce5fa56">Internal link</a></p> <p>Our Session ID is: a17309afea8f2791078fc046cce5fa56</p> <p>Our PHP Version is: 7.1.1</p> Test script: --------------- <?php ini_set('session.use_cookies', '0'); ini_set('session.use_only_cookies',0); ini_set('session.use_trans_sid',1); session_start(); ?> <p><a href="index.php">Click This Anchor Tag!</a></p> <p><a href="#place">Internal link</a></p> <p>Our Session ID is: <?= session_id() ?></p> <p>Our PHP Version is: <?= phpversion() ?></p> Expected result: ---------------- <p><a href="index.php?PHPSESSID=aec2a7538bfe295d6a6c9ff70c42f8eb">Click This Anchor Tag!</a></p> <p><a href="#place">Internal link</a></p> <p>Our Session ID is: aec2a7538bfe295d6a6c9ff70c42f8eb</p> <p>Our PHP Version is: 5.6.28</p> This is the output from the script on 5.6.28. Note that '#place" does not get the session applied. Actual result: -------------- <p><a href="index.php?PHPSESSID=a17309afea8f2791078fc046cce5fa56">Click This Anchor Tag!</a></p> <p><a href="#place/?PHPSESSID=a17309afea8f2791078fc046cce5fa56">Internal link</a></p> <p>Our Session ID is: a17309afea8f2791078fc046cce5fa56</p> <p>Our PHP Version is: 7.1.1</p> This is the output from 7.1.1 (sorry I don't have easy access to 7.1.7) -- Edit bug report at https://bugs.php.net/bug.php?id=74892&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74892&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74892&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74892&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74892&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74892&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74892&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74892&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74892&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74892&r=support Expected behavior: https://bugs.php.net/fix.php?id=74892&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74892&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74892&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74892&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74892&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74892&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74892&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74892&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74892&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74892&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74892&r=mysqlcfg

« previous php.bugs (#209961) next »