diff options
author | Stanislav Malyshev <stas@php.net> | 2007-09-13 20:04:22 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2007-09-13 20:04:22 +0000 |
commit | cd836153d674bafda5e1a1b54eecb559d8f76de1 (patch) | |
tree | fb418ca831b76842365f5b53921cc720ce752aad | |
parent | bb2ec1c7907d1231da2778bb75e1fa6a44ae73cc (diff) | |
download | php-git-cd836153d674bafda5e1a1b54eecb559d8f76de1.tar.gz |
disallow setting mail.force_extra_parameters from .htaccess
-rw-r--r-- | main/main.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/main/main.c b/main/main.c index 2a69c66bb5..8ce3afef0f 100644 --- a/main/main.c +++ b/main/main.c @@ -318,6 +318,19 @@ static PHP_INI_MH(OnUpdateErrorLog) } /* }}} */ +/* {{{ PHP_INI_MH + */ +static PHP_INI_MH(OnChangeMailForceExtra) +{ + /* Don't allow changing it in htaccess */ + if (stage == PHP_INI_STAGE_HTACCESS) { + return FAILURE; + } + return SUCCESS; +} +/* }}} */ + + /* Need to convert to strings and make use of: * PHP_SAFE_MODE * @@ -428,7 +441,7 @@ PHP_INI_BEGIN() PHP_INI_ENTRY("precision", "14", PHP_INI_ALL, OnSetPrecision) PHP_INI_ENTRY("sendmail_from", NULL, PHP_INI_ALL, NULL) PHP_INI_ENTRY("sendmail_path", DEFAULT_SENDMAIL_PATH, PHP_INI_SYSTEM, NULL) - PHP_INI_ENTRY("mail.force_extra_parameters",NULL, PHP_INI_SYSTEM|PHP_INI_PERDIR, NULL) + PHP_INI_ENTRY("mail.force_extra_parameters",NULL, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnChangeMailForceExtra) PHP_INI_ENTRY("disable_functions", "", PHP_INI_SYSTEM, NULL) PHP_INI_ENTRY("disable_classes", "", PHP_INI_SYSTEM, NULL) |