Commit Graph

25 Commits

Author SHA1 Message Date
Christoph M. Becker
c0f8cc1904 Merge branch 'PHP-7.4' into master
* PHP-7.4:
  Fix #80114: parse_url does not accept URLs with port 0
2020-09-20 15:38:18 +02:00
Christoph M. Becker
105132bd6b Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80114: parse_url does not accept URLs with port 0
2020-09-20 15:37:11 +02:00
Christoph M. Becker
81b2f3e5d9 Fix #80114: parse_url does not accept URLs with port 0
URIs with a 0 port are generally valid, so `parse_url()` should
recognize such URIs, but still report the port as missing.

Co-authored-by: twosee <twose@qq.com>

Closes GH-6152.
2020-09-20 15:34:45 +02:00
Nikita Popov
0bc2657b2f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix binary-safety of parse_url
2020-09-02 16:46:49 +02:00
Nikita Popov
81811dbbfb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix binary-safety of parse_url
2020-09-02 16:45:57 +02:00
Nikita Popov
54dbd3eccc Fix binary-safety of parse_url
php_parse_url() is intended to support strings that are not zero
terminated. We can't use strcspn in the implementation.

As we have two uses of strcspn, add a helper.
2020-09-02 16:45:25 +02:00
Máté Kocsis
b5c7a83dca
Remove unnecessary PHPDoc-alike blocks from tests
Closes GH-5759
2020-06-24 13:13:44 +02:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Islam Israfilov
f553e676ec Fixed #78385: Distinguish absent/empty query/fragment
http://example.com/foo   => query = null, fragment = null
http://example.com/foo?  => query = "",   fragment = null
http://example.com/foo#  => query = null, fragment = ""
http://example.com/foo?# => query = "",   fragment = ""

Closes GH-5078.
2020-01-13 10:18:23 +01:00
Fabien Villepinte
26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Peter Kokot
d7a3edd45d Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
Peter Kokot
782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Gabriel Caruso
9c144e0d82
Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Nikita Popov
9c1c8be7a2 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-08 01:10:37 +02:00
Nikita Popov
b061fa909d Fix bug #73192 2016-10-08 01:04:22 +02:00
Nikita Popov
1c468ee044 Revert "Added validation to parse_url() to prohibit restricted characters inside login/pass components based on RFC3986"
This reverts commit 085dfca02b.
2016-10-08 00:43:17 +02:00
Ilia Alshanetsky
085dfca02b Added validation to parse_url() to prohibit restricted characters inside login/pass components based on RFC3986 2016-10-04 21:20:31 -07:00
Julien Pauli
e2add3ed87 Fixed parse_url() for better compliance with RFC3986 2016-06-22 14:05:25 +02:00
Ilia Alshanetsky
f705063e23 Added validation to parse_url() to prohibit restricted characters inside login/pass components based on RFC3986 2015-12-22 18:12:56 +01:00
Stanislav Malyshev
03c703b8bd add a test case previously broken by a bad fix 2014-04-24 23:58:38 -07:00
Sara Golemon
8b6b39fdcf Add a couple more test cases to parse_url() tests
http://::# (valid but silly)
http://#   (invalid)
2013-11-06 10:32:11 +01:00
Ilia Alshanetsky
6186c16449 Fixed parse_url() tests to account for port validation 2011-02-06 17:23:57 +00:00
Pierre Joye
cba1ed2475 - #50563, removing E_WARNING from parse_url() 2010-06-16 18:56:24 +00:00
Robin Fernandes
bcd9a07d6c Adding some tests for ereg and url functions. 2008-04-11 08:57:17 +00:00