Bug #74892 [Csd->ReO]: Url Rewriting (trans_sid) not working on urls that start with #

From: Date: Fri, 23 Mar 2018 08:17:23 +0000
Subject: Bug #74892 [Csd->ReO]: Url Rewriting (trans_sid) not working on urls that start with #
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214447@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74892&edit=1 ID: 74892 Updated by: requinix@php.net Reported by: drchuck at gmail dot com Summary: Url Rewriting (trans_sid) not working on urls that start with # -Status: Closed +Status: Re-Opened Type: Bug Package: Session related Operating System: Mac OS/X PHP Version: 7.1.7 Block user comment: N Private report: N New Comment: Fixed in 7.1 but present in 7.2. https://3v4l.org/U96sK Previous Comments: ------------------------------------------------------------------------ [2017-07-18 19:23:32] nikic@php.net Automatic comment on behalf of andrew.nester.dev@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=6c32d271d238a18cfc19d98877cdead1ab38f417 Log: Fixed #74892 - Fixed URL rewriting for urls started with # ------------------------------------------------------------------------ [2017-07-11 18:54:14] andrew dot nester dot dev at gmail dot com Thanks for reporting the issue! I've just sent PR fixing this. ------------------------------------------------------------------------ [2017-07-10 15:18:41] requinix@php.net Affects 7.1+ https://3v4l.org/U96sK ------------------------------------------------------------------------ [2017-07-10 14:30:03] drchuck at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=74892&edit=1

« previous php.bugs (#214447) next »