php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #64082
Patch tidy-zend-and-safemode-fixes revision 2013-01-27 00:22 UTC by iliya at polihronov dot com

Patch tidy-zend-and-safemode-fixes for Tidy Bug #64082

Patch version 2013-01-27 00:22 UTC

Return to Bug #64082 | Download this patch
Patch Revisions:

Developer: iliya@polihronov.com

--- tidy-1.2.orig/tidy.c    2005-11-07 13:40:55.000000000 +0000
+++ tidy-1.2/tidy.c 2012-10-25 18:17:26.000000000 +0000
@@ -29,7 +29,6 @@
 #include "ext/standard/info.h"
 #include "Zend/zend_API.h"
 #include "Zend/zend_hash.h"
-#include "safe_mode.h"

 ZEND_DECLARE_MODULE_GLOBALS(tidy);

@@ -40,13 +39,13 @@
 } \

 #define TIDY_SAFE_MODE_CHECK(filename) \
-if ((PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename TSRMLS_CC)) { \
+if (php_check_open_basedir(filename TSRMLS_CC)) { \
    RETURN_FALSE; \
 } \

 #define TIDY_CLEAR_ERROR  if (TG(tdoc)->errbuf && TG(tdoc)->errbuf->bp) { tidyBufClear(TG(tdoc)->errbuf); }

-function_entry tidy_functions[] = {
+zend_function_entry tidy_functions[] = {
    PHP_FE(tidy_setopt,             NULL)
    PHP_FE(tidy_getopt,             NULL)
    PHP_FE(tidy_parse_string,       NULL)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 00:01:32 2024 UTC