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
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: 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: Fri Oct 11 12:01:27 2024 UTC