]> granicus.if.org Git - php/commitdiff
Merge branch 'sec53' into sec54
authorStanislav Malyshev <stas@php.net>
Sun, 25 Mar 2012 19:51:46 +0000 (12:51 -0700)
committerStanislav Malyshev <stas@php.net>
Sun, 25 Mar 2012 19:51:46 +0000 (12:51 -0700)
* sec53:
  fix bug #61367 - open_basedir bypass using libxml RSHUTDOWN

1  2 
NEWS
ext/libxml/libxml.c

diff --cc NEWS
index f3e3f9cb74fb8fd633e0e0eecdb952dbae4c9bfa,366315dc7ff02da4fc3f4b1d5ca9cfd618cdc46b..715ce27ca13b6a764500b3f1069227c4e1a9815a
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -45,9 -36,16 +45,13 @@@ PH
  - Installation
    . Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)
  
 -- Fileinfo
 -  . Fixed bug #61173 (Unable to detect error from finfo constructor). (Gustavo)
 -
 -- Firebird Database extension (ibase):
 -  . Fixed bug #60802 (ibase_trans() gives segfault when passing params).
 +- mbstring:
 +  . MFH mb_ereg_replace_callback() for security enhancements. (Rui)
  
+ - Libxml:
+   . Fixed bug #61367 (open_basedir bypass using libxml RSHUTDOWN). 
+     (Tim Starling)
  - mysqli
    . Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes).
  
index 93d410bc767239b4b360761a1e3cdab0c22443d1,515d58ea6ad376df150a56f744d23d42491d4510..9d6c25737d0f4b82ba49209d756e8941b850a38a
@@@ -861,17 -655,15 +861,17 @@@ static PHP_MSHUTDOWN_FUNCTION(libxml
        return SUCCESS;
  }
  
- static PHP_RSHUTDOWN_FUNCTION(libxml)
+ static int php_libxml_post_deactivate()
  {
+       TSRMLS_FETCH();
        /* reset libxml generic error handling */
 -      xmlSetGenericErrorFunc(NULL, NULL);
 -      xmlSetStructuredErrorFunc(NULL, NULL);
 +      if (_php_libxml_per_request_initialization) {
 +              xmlSetGenericErrorFunc(NULL, NULL);
 +              xmlSetStructuredErrorFunc(NULL, NULL);
  
 -      xmlParserInputBufferCreateFilenameDefault(NULL);
 -      xmlOutputBufferCreateFilenameDefault(NULL);
 +              xmlParserInputBufferCreateFilenameDefault(NULL);
 +              xmlOutputBufferCreateFilenameDefault(NULL);
 +      }
  
        if (LIBXML(stream_context)) {
                zval_ptr_dtor(&LIBXML(stream_context));