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

From: Date: Thu, 22 Jan 2015 19:58:15 +0000
Subject: com php-src: Fix bug #64938: libxml_disable_entity_loader setting is shared between threads: ext/libxml/li bxml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84535@lists.php.net to get a copy of this message
Commit: c1eb87ab1a2e2df1868b70cd7b8016c6147092c5 Author: Martin Jansen <martin@divbyzero.net> Thu, 22 Jan 2015 20:58:15 +0100 Parents: 1010b0ea4f4b9f96ae744f04c1191ac228580e48 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c1eb87ab1a2e2df1868b70cd7b8016c6147092c5 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 ext/libxml/libxml.c Diff: diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 1ed6e97..843ca0a 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -860,6 +860,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 (#84535) next »