php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44036 parse_url and trailing \n (\r)
Submitted: 2008-02-04 10:52 UTC Modified: 2008-02-04 21:04 UTC
From: leonid_boytsov at yahoo dot com Assigned:
Status: Not a bug Package: *URL Functions
PHP Version: 5.2.5 OS: Linux
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: leonid_boytsov at yahoo dot com
New email:
PHP Version: OS:

 

 [2008-02-04 10:52 UTC] leonid_boytsov at yahoo dot com
Description:
------------
Trailing '\r' or '\n' in URL causes _ to be appended to either the path or to the host.


Reproduce code:
---------------
<? print_r(parse_url("http://test.com/\n")); ?>



Expected result:
----------------
Array
(
    [scheme] => http
    [host] => test.com
    [path] => /
)

Actual result:
--------------
Array
(
    [scheme] => http
    [host] => test.com
    [path] => /_
)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-04 21:04 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

All non-valid (high/low ascii) chars get replaced with _
 [2014-06-13 08:10 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=333767
Log: FPM socket default mode

--
Patch by anonymous #44036
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC