diff options
| author | Martin Jansen <martin@divbyzero.net> | 2015-01-22 20:58:15 +0100 |
|---|---|---|
| committer | Martin Jansen <martin@divbyzero.net> | 2015-01-22 20:58:15 +0100 |
| commit | c1eb87ab1a2e2df1868b70cd7b8016c6147092c5 (patch) | |
| tree | 06338433b613cb576ddb7cf46c295d6aff98653d /ext/libxml/libxml.c | |
| parent | 1010b0ea4f4b9f96ae744f04c1191ac228580e48 (diff) | |
| download | php-git-c1eb87ab1a2e2df1868b70cd7b8016c6147092c5.tar.gz | |
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.
Diffstat (limited to 'ext/libxml/libxml.c')
| -rw-r--r-- | ext/libxml/libxml.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 1ed6e97e8d..843ca0a7a6 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; } |
