diff options
author | Dmitry Stogov <dmitry@php.net> | 2006-09-06 08:54:23 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2006-09-06 08:54:23 +0000 |
commit | 6024885e40594bc9b9972affb8aebfc04b2a6014 (patch) | |
tree | 05455f8d9c74137ba641b34890db9d1cb9cc8409 | |
parent | 6b397e5fc5cdedcfcb05ec94efd900a0e8d991b6 (diff) | |
download | php-git-6024885e40594bc9b9972affb8aebfc04b2a6014.tar.gz |
Fixed php_admin* bypass by ini_restore()
-rw-r--r-- | Zend/zend_ini.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index a9ed9d3e69..a43cc1889c 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -256,8 +256,8 @@ ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage) zend_ini_entry *ini_entry; TSRMLS_FETCH(); - if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE) { - return FAILURE; + if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE || + (stage == ZEND_INI_STAGE_RUNTIME && (ini_entry->modifiable & ZEND_INI_USER) == 0)) { return FAILURE; } zend_restore_ini_entry_cb(ini_entry, stage TSRMLS_CC); |