php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12722 Re: extra slash / auto appending session ID
Submitted: 2001-08-13 13:07 UTC Modified: 2001-08-14 11:55 UTC
From: pulstar at mail dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.6 OS: Red Hat 7.1
Private report: No CVE-ID: None
 [2001-08-13 13:07 UTC] pulstar at mail dot com
>The extra slash is so that PHP is in compliance with 
>XHTML 1.0. 
>See http://www.w3.org/MarkUp/ for more information.
>Also, if this is causing your applications problems, 
>you may be designing them incorrectly.

Well, I think the slash placed by PHP in the end of the INPUT tag was misinterpreted by Internet Explorer, but not. Below are two examples. The first are links without the session ID appended by PHP. The second is the same links with the session ID automatically appended by PHP. I think it append the ID because the cookie was not avaliable (I don't know why) when the page was loaded at the first time. When I reload the page, it works fine. This occurs everytime when I open the site in my browser.

a) Without appended session ID:

1) <form action=main.php name=post method=post>
<input type=hidden name=hrefvars value=''>
</form>

2) <td colspan=3 align=center><a href='tools/redirect.php?key=8'><img width="468" height="60" src='banners/metro_banner1.jpg' border=0></a><br>&nbsp;</td>

3) <a href='http://www.abese.org' target='_blank'>see more</a>

4) <div align=justify>The most new option in electronic security. <a href='main.php?run=articles&cur=2&key=28'>See more</a></div>.

5) <a href='tools/redirect.php?key=6'><img width="234" height="60" src='banners/rent.gif' border=0></a><br><br>

<a href='tools/redirect.php?key=5'><img width="234" height="60" src='banners/banner2.jpg' border=0></a><br><br>


b) With appended session ID by PHP:

1) <form action="main.php" name="post" method="post"><input type="hidden" name="PHPSESSID" value="a5b911cf5f2c235d82f6c7af1e05f7b4" />
<input type="hidden" name="hrefvars" value=''>
</form>

2) <td colspan=3 align=center><a href="'tools/redirect.php?key=8'pkey=ign=center&PHPSESSID=a5b911cf5f2c235d82f6c7af1e05f7b4">>idden name=hrefvars value=''><><img width="468" height="60" src='banners/metro_banner1.jpg' border=0></a><br>&nbsp;</td>

3) <a href='http://www.abese.org' target="'_blank'e.org'" >See more</a>

4) <div align=justify>The most new option in electronic security. <a href="'main.php?run=artigos&cur=2&key=28'ronic&PHPSESSID=a5b911cf5f2c235d82f6c7af1e05f7b4" >See more</a>.

5) <a href="'tools/redirect.php?key=6'p?key=&PHPSESSID=a5b911cf5f2c235d82f6c7af1e05f7b4"><><img width="234" height="60" src='banners/rent.gif' border=0></a><br><br>

6) <a href="'tools/redirect.php?key=5'p?key=c='banners/&PHPSESSID=a5b911cf5f2c235d82f6c7af1e05f7b4">
<><img width="234" height="60" src='banners/banner2.jpg' border=0></a><br><br>

The first append is correct, it have only that slash that I didn't knew about. But some part of the html from it was placed over the second. As you can see, it is making a mess in the resulting HTML. Are you sure this is a bug in my application? :-)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-14 06:30 UTC] sniper@php.net
There have been some fixes to this in CVS.
Please try the latest snapshot from http://snaps.php.net/

(I can not reproduce this)

--Jani

 [2001-08-14 11:55 UTC] sniper@php.net
This is fixed.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 07:01:32 2024 UTC