php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34242 "local" non-relative links do not get rewriten when trans_sid is on
Submitted: 2005-08-24 23:24 UTC Modified: 2005-08-24 23:53 UTC
From: marcus at quintic dot co dot uk Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.4.0 OS: All
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: marcus at quintic dot co dot uk
New email:
PHP Version: OS:

 

 [2005-08-24 23:24 UTC] marcus at quintic dot co dot uk
Description:
------------
If trans_sid is set to 1, urls are rewritten with the current SID attached to them so that sessions work in non-cookie environments. In the manual it says that this does not rewrite non-relative urls as they are assumed to point off site.

The problem is, this means that "local" non-relative links dont get rewritten. So if I have a site at www.domain.xyz and two links www.domain.xyz/page.html and /page.html only the second will get rewritten.

Surely the correct behaviour would be to also rewrite such links? The assumption that all non-relative links are non-local seems a bit lazy when all you'd actually have to add is a quick check for the host. Admittedly the host may have more than one name, but for the majority of sites I wouldnt have thought this would be an issue.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-24 23:53 UTC] sniper@php.net
There's nothing wrong with it. Trust the manual.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 18:01:32 2025 UTC