iliaa Thu Sep 28 14:52:31 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard url.c
/php-src/ext/standard/tests/strings url_t.phpt
/php-src NEWS
Log:
Fixed bug #38859 (parse_url() fails if passing '@' in passwd).
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/url.c?r1=1.86.2.5.2.5&r2=1.86.2.5.2.6&diff_format=u
Index: php-src/ext/standard/url.c
diff -u php-src/ext/standard/url.c:1.86.2.5.2.5
php-src/ext/standard/url.c:1.86.2.5.2.6
--- php-src/ext/standard/url.c:1.86.2.5.2.5 Thu Sep 28 12:55:15 2006
+++ php-src/ext/standard/url.c Thu Sep 28 14:52:30 2006
@@ -15,7 +15,7 @@
| Author: Jim Winstead <[EMAIL PROTECTED]>
|
+----------------------------------------------------------------------+
*/
-/* $Id: url.c,v 1.86.2.5.2.5 2006/09/28 12:55:15 tony2001 Exp $ */
+/* $Id: url.c,v 1.86.2.5.2.6 2006/09/28 14:52:30 iliaa Exp $ */
#include <stdlib.h>
#include <string.h>
@@ -211,7 +211,7 @@
}
/* check for login and password */
- if ((p = memchr(s, '@', (e-s)))) {
+ if ((p = zend_memrchr(s, '@', (e-s)))) {
if ((pp = memchr(s, ':', (p-s)))) {
if ((pp-s) > 0) {
ret->user = estrndup(s, (pp-s));
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/url_t.phpt?r1=1.9.2.3&r2=1.9.2.3.2.1&diff_format=u
Index: php-src/ext/standard/tests/strings/url_t.phpt
diff -u php-src/ext/standard/tests/strings/url_t.phpt:1.9.2.3
php-src/ext/standard/tests/strings/url_t.phpt:1.9.2.3.2.1
--- php-src/ext/standard/tests/strings/url_t.phpt:1.9.2.3 Sun Feb 12
16:39:44 2006
+++ php-src/ext/standard/tests/strings/url_t.phpt Thu Sep 28 14:52:30 2006
@@ -71,6 +71,7 @@
'scheme:',
'foo+bar://[EMAIL PROTECTED]/bla',
'gg:9130731',
+'http://user:@[EMAIL PROTECTED]/path?argument?value#etc',
);
foreach ($sample_urls as $url) {
@@ -525,11 +526,11 @@
["scheme"]=>
string(4) "http"
["host"]=>
- string(19) "[EMAIL PROTECTED]"
+ string(11) "www.php.net"
["port"]=>
int(80)
["user"]=>
- string(6) "secret"
+ string(14) "[EMAIL PROTECTED]"
["path"]=>
string(10) "/index.php"
["query"]=>
@@ -685,6 +686,22 @@
["path"]=>
string(7) "9130731"
}
+array(7) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(4) "host"
+ ["user"]=>
+ string(4) "user"
+ ["pass"]=>
+ string(5) "@pass"
+ ["path"]=>
+ string(5) "/path"
+ ["query"]=>
+ string(14) "argument?value"
+ ["fragment"]=>
+ string(3) "etc"
+}
string(4) "http"
string(11) "www.php.net"
int(80)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.271&r2=1.2027.2.547.2.272&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.271 php-src/NEWS:1.2027.2.547.2.272
--- php-src/NEWS:1.2027.2.547.2.271 Thu Sep 28 12:57:56 2006
+++ php-src/NEWS Thu Sep 28 14:52:31 2006
@@ -16,6 +16,7 @@
the imap library). (Ilia)
- Fixed bug #38904 (apache2filter changes cwd to /). (Ilia, bjori)
- Fixed bug #38891 (get_headers() do not work with curl-wrappers). (Ilia)
+- Fixed bug #38859 (parse_url() fails if passing '@' in passwd). (Tony)
- Fixed bug #38844 (curl_easy_strerror() is defined only since cURL 7.12.0).
(Tony)
- Fixed bug #38808 ("maybe ref" issue for current() and others). (Dmitry)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php