php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21397 magic_quotes? or some thing is wrongfully modifying specific strings
Submitted: 2003-01-03 14:28 UTC Modified: 2003-01-03 16:05 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: danlo at danlo dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.3.0 OS: FreeBSD 4.6 Stable
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: danlo at danlo dot com
New email:
PHP Version: OS:

 

 [2003-01-03 14:28 UTC] danlo at danlo dot com
Something about magic_qoutes (or the URL=>_GET) is adding extra '>' in specific situations. (As if it was trying to close the tags.) For example (magic quotes on).

Input    $_GET has
<[<      <[>< 
<-<      <-><

And in addition the ,"\n\n<br>" seams to be adding its own '>'.

A script showing this problem is below:

<html>
<body>
<?php

if ($_GET['text']) echo "You posted this string: ",$_GET['text'],"\n\n<br>";
echo "\n";
if ($_GET['text']) echo "htmlentities returns: ",htmlentities($_GET['text']),"\n<br>";

?>
<form method=get action="<?php echo $HTTP_SERVER_VARS['PHP_SELF']; ?>">
<input type=text name=text value="&lt;[&lt;">
<input type=submit value="Try this">
</form>
<form method=get action="<?php echo $HTTP_SERVER_VARS['PHP_SELF']; ?>">
<input type=text name=text value="a<=b">
<input type=submit value="Try this">
</form>
</body>
</html>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-03 14:29 UTC] danlo at danlo dot com
Thank you for your time, if you have any questions about the script, or need to see it run on our system, please feel free to contact me.

-daniel
 [2003-01-03 14:46 UTC] danlo at danlo dot com
This seams to be something about my computer.  I don't know what is causing it.  It happens on IE/NS/Opera
 [2003-01-03 15:32 UTC] tularis@php.net
I ran that script, and the output was as could be expected....

might I ask what version of PHP you are running? i might be a very old one which had a bug like that, though that is quite unlikely
 [2003-01-03 16:01 UTC] danlo at danlo dot com
Thank you for your time,

It is something about my computer, I tried this bug on netscape, ie, opera (latests), and it appeared on all of them, but when I checked on another computer, it didn't have that problem.  I have no idea whats going on.  I think re-install windows 2000 -again.  (I do this about 2 or 3 times a year.)


-daniel
 [2003-01-03 16:05 UTC] danlo at danlo dot com
I am closing this bug, as it is a problem on my client (W2k) side, and the server (FreeBSD) is ok.

-daniel
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Sep 29 01:01:26 2024 UTC