Bug #77804 [NEW]: parse_url illegal host
| From: | 1085242202 at qq dot com | Date: | Wed, 27 Mar 2019 08:13:51 +0000 |
| Subject: | Bug #77804 [NEW]: parse_url illegal host | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-220221@lists.php.net to get a copy of this message | ||
From: 1085242202 at qq dot com
Operating system: Red Hat Enterprise Linux Server
PHP version: master-Git-2019-03-27 (Git)
Package: *General Issues
Bug Type: Bug
Bug description:parse_url illegal host
Description:
------------
"var_dump(parse_url('http://baidu.com\pinyin.sogou.com'));"
array(2) {
["scheme"]=>
string(4) "http"
["host"]=>
string(26) "baidu.com\pinyin.sogou.com"
}
"baidu.com\pinyin.sogou.com" maybe is an illegal host
ps:ç©ºæ ¼å符å·å¦âï¼/\ï¼ï¼@#$%^~_=+ï¼8ï¼
ã<>âçé½ä¸è½ç¨å¨ååå½å
https://zhidao.baidu.com/question/337004301.html
Test script:
---------------
var_dump(parse_url('http://baidu.com\pinyin.sogou.com'));
array(2) {
["scheme"]=>
string(4) "http"
["host"]=>
string(26) "baidu.com\pinyin.sogou.com"
}
Expected result:
----------------
array(2) {
["scheme"]=>
string(4) "http"
["host"]=>
string(26) "baidu.com"
}
Actual result:
--------------
array(2) {
["scheme"]=>
string(4) "http"
["host"]=>
string(26) "baidu.com\pinyin.sogou.com"
}
--
Edit bug report at https://bugs.php.net/bug.php?id=77804&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77804&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77804&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77804&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77804&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77804&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77804&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77804&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77804&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77804&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77804&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77804&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77804&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77804&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77804&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77804&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77804&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77804&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77804&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77804&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77804&r=mysqlcfg