From: Stanislav Malyshev Date: Sun, 25 Mar 2012 19:51:46 +0000 (-0700) Subject: Merge branch 'sec53' into sec54 X-Git-Tag: php-5.4.1RC1~2^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a74cb40080c9e16f7ae952fc46f64b219aaf77e;p=php Merge branch 'sec53' into sec54 * sec53: fix bug #61367 - open_basedir bypass using libxml RSHUTDOWN --- 2a74cb40080c9e16f7ae952fc46f64b219aaf77e diff --cc NEWS index f3e3f9cb74,366315dc7f..715ce27ca1 --- a/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). diff --cc ext/libxml/libxml.c index 93d410bc76,515d58ea6a..9d6c25737d --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@@ -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));