Skip to content

Commit f930ff5

Browse files
smalyshevcmb69
authored andcommitted
Fix bug #79329 - get_headers should not accept \0
(cherry picked from commit 69fdc14)
1 parent f593956 commit f930ff5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ PHP NEWS
4444
. Fixed bug #79294 (::columnType() may fail after SQLite3Stmt::reset()). (cmb)
4545

4646
- Standard:
47+
. Fixed bug #79329 (get_headers() silently truncates after a null byte).
48+
(CVE-2020-7066) (cmb)
4749
. Fixed bug #79254 (getenv() w/o arguments not showing changes). (cmb)
4850
. Fixed bug #79265 (Improper injection of Host header when using fopen for
4951
http requests). (Miguel Xavier Penha Neto)

ext/standard/url.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ PHP_FUNCTION(get_headers)
672672
php_stream_context *context;
673673

674674
ZEND_PARSE_PARAMETERS_START(1, 3)
675-
Z_PARAM_STRING(url, url_len)
675+
Z_PARAM_PATH(url, url_len)
676676
Z_PARAM_OPTIONAL
677677
Z_PARAM_LONG(format)
678678
Z_PARAM_RESOURCE_EX(zcontext, 1, 0)

0 commit comments

Comments
 (0)