com php-src: Fix bug #64938: libxml_disable_entity_loader setting is shared between threads: NEWS ext/li bxml/libxml.c

From: Date: Sun, 01 Feb 2015 08:08:35 +0000
Subject: com php-src: Fix bug #64938: libxml_disable_entity_loader setting is shared between threads: NEWS ext/li bxml/libxml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84537@lists.php.net to get a copy of this message
Commit: de31324c221c1791b26350ba106cc26bad23ace9 Author: Martin Jansen <martin@divbyzero.net> Thu, 22 Jan 2015 20:58:15 +0100 Committer: Stanislav Malyshev <stas@php.net> Sun, 1 Feb 2015 00:08:35 -0800 Parents: e5e251b02309d046680e9190cfc688fab4e5670e Branches: PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=de31324c221c1791b26350ba106cc26bad23ace9 Log: Fix bug #64938: libxml_disable_entity_loader setting is shared between threads The availability of entity loading is stored in a module global which previously was only initialized in the GINIT constructor. This had the effect that disabling the entity loader in one request caused subsequent requests hitting the same Apache child process to also have the loader disabled. With this change the loader is explicitely enabled in the request init phase. Bugs: https://bugs.php.net/64938 Changed paths: M NEWS M ext/libxml/libxml.c Diff: diff --git a/NEWS b/NEWS index 718edde..4e33fbd 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,10 @@ PHP NEWS . Fixed bug #68571 (core dump when webserver close the socket). (redfoxli069 at gmail dot com, Laruence) +- Libxml: + . Fixed bug #64938 (libxml_disable_entity_loader setting is shared + between threads). (Martin Jansen) + - OpenSSL: . Fixed bug #55618 (use case-insensitive cert name matching). (Daniel Lowrey) diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 4b7a36a..5f0da89 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -857,6 +857,12 @@ static PHP_RINIT_FUNCTION(libxml) xmlSetGenericErrorFunc(NULL, php_libxml_error_handler); xmlParserInputBufferCreateFilenameDefault(php_libxml_input_buffer_create_filename); xmlOutputBufferCreateFilenameDefault(php_libxml_output_buffer_create_filename); + + /* Enable the entity loader by default. This ensure that + * other threads/requests that might have disable the loader + * do not affect the current request. + */ + LIBXML(entity_loader_disabled) = 0; } return SUCCESS; }

« previous php.cvs (#84537) next »