From: Dmitry Stogov Date: Wed, 6 Sep 2006 08:54:57 +0000 (+0000) Subject: Fixed php_admin* bypass by ini_restore() X-Git-Tag: RELEASE_1_0_0RC1~1760 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97fdcf0f3bb9f99716091d7b70538f9bf33ce2f4;p=php Fixed php_admin* bypass by ini_restore() --- diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index f5dc5fe845..d3a9c5ed76 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -275,7 +275,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) { + 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; }