diff options
author | Pierre Joye <pajoye@php.net> | 2007-03-14 11:08:57 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2007-03-14 11:08:57 +0000 |
commit | 1c0b8e6f15e416f011263f2d20b5c0281de9fafc (patch) | |
tree | 12d96769f4fd9e548081e22ee043307ba6dccc3f /ext/zip/php_zip.h | |
parent | 4f5303ab925c5284decfe47dbaa31a2b9a1b8d5b (diff) | |
download | php-git-1c0b8e6f15e416f011263f2d20b5c0281de9fafc.tar.gz |
- rename SAFEMODE_CHECKFILE to OPENBASEDIR_CHECKPATH (can be used without
confusing in head without confusion)
- Add safemode and open basedir checks in zip:// wrapper (revert Ilia's
patch). Bug found by Stefan Esser in his MOPB-20-2007
Diffstat (limited to 'ext/zip/php_zip.h')
-rw-r--r-- | ext/zip/php_zip.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index cbfc9b9502..f194151941 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -30,6 +30,16 @@ extern zend_module_entry zip_module_entry; #include "lib/zip.h" +/* {{{ OPENBASEDIR_CHECKPATH(filename) */ +#if (PHP_MAJOR_VERSION < 6) +#define OPENBASEDIR_CHECKPATH(filename) \ + (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename TSRMLS_CC) +#else +#define OPENBASEDIR_CHECKPATH(filename) \ + php_check_open_basedir(filename TSRMLS_CC) +#endif +/* }}} */ + typedef struct _ze_zip_rsrc { struct zip *za; int index_current; |