Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:FrontRunner
php8.24708
php8-CVE-2021-21707.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File php8-CVE-2021-21707.patch of Package php8.24708
Index: php-8.0.10/ext/dom/domimplementation.c =================================================================== --- php-8.0.10.orig/ext/dom/domimplementation.c +++ php-8.0.10/ext/dom/domimplementation.c @@ -78,6 +78,11 @@ PHP_METHOD(DOMImplementation, createDocu pch2 = (xmlChar *) systemid; } + if (strstr(name, "%00")) { + php_error_docref(NULL, E_WARNING, "URI must not contain percent-encoded NUL bytes"); + RETURN_FALSE; + } + uri = xmlParseURI(name); if (uri != NULL && uri->opaque != NULL) { localname = xmlStrdup((xmlChar *) uri->opaque); Index: php-8.0.10/ext/libxml/libxml.c =================================================================== --- php-8.0.10.orig/ext/libxml/libxml.c +++ php-8.0.10/ext/libxml/libxml.c @@ -255,6 +255,10 @@ static void *php_libxml_streams_IO_open_ int isescaped=0; xmlURI *uri; + if (strstr(filename, "%00")) { + php_error_docref(NULL, E_WARNING, "URI must not contain percent-encoded NUL bytes"); + return NULL; + } uri = xmlParseURI(filename); if (uri && (uri->scheme == NULL || @@ -434,6 +438,11 @@ php_libxml_output_buffer_create_filename if (URI == NULL) return(NULL); + if (strstr(URI, "%00")) { + php_error_docref(NULL, E_WARNING, "URI must not contain percent-encoded NUL bytes"); + return NULL; + } + puri = xmlParseURI(URI); if (puri != NULL) { if (puri->scheme != NULL)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor