Skip to content

Commit ced4c0b

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: [ci skip] Update NEWS [ci skip] Fix order [ci skip] Unpdate NEWS Fix #77423: parse_url() will deliver a wrong host to user
2 parents 8768621 + e659320 commit ced4c0b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/standard/url.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ PHPAPI php_url *php_url_parse_ex2(char const *str, size_t length, zend_bool *has
249249
ret->pass = zend_string_init(pp, (p-pp), 0);
250250
php_replace_controlchars_ex(ZSTR_VAL(ret->pass), ZSTR_LEN(ret->pass));
251251
} else {
252-
if (!is_userinfo_valid(s, p-s)) {
253-
goto check_port;
254-
}
252+
if (!is_userinfo_valid(s, p-s)) {
253+
goto check_port;
254+
}
255255
ret->user = zend_string_init(s, (p-s), 0);
256-
php_replace_controlchars_ex(ZSTR_VAL(ret->user), ZSTR_LEN(ret->user));
256+
php_replace_controlchars_ex(ZSTR_VAL(ret->user), ZSTR_LEN(ret->user));
257257
}
258258

259259
s = p + 1;

0 commit comments

Comments
 (0)