php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4123 rawurlencode() is not RFC1738-complient
Submitted: 2000-04-12 19:58 UTC Modified: 2000-06-22 21:30 UTC
From: martin at inmeco dot de Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.15 OS: Linux / Windows NT
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: martin at inmeco dot de
New email:
PHP Version: OS:

 

 [2000-04-12 19:58 UTC] martin at inmeco dot de
rawurlencode() does not convert the '%' character to '%25' althought this character is specified in RFC1738 as unsafe thus it has to be converted to '%25'.

This is a serious leak if you use rawurlencode() and rawurldecode().

For example the code snippet

$a = rawurlencode("%berg%");
print rawurldecode($a);

produces a

?rg%

instead of

%berg%

Since I've been using rawurlencode()/rawurldecode() pairs in many different scripts that work on a lot of different sites I sit on a bomb now because I don't know when the first character string like '%be' or '%12' will be misinterpreted.

BTW: How about founding rawurlencode() on the more accurate RFC2396 that on 1738?

Bye
Martin Kadlec

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-22 21:30 UTC] hholzgra at cvs dot php dot net
latest php3 and php4 cvs versions 
convert % to %25 
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 20 12:00:01 2026 UTC