From f9d32b3685241791db24185131d3b8d648d0d410 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Thu, 13 Sep 2007 20:06:15 +0000 Subject: [PATCH] MFB: disallow setting mail.force_extra_parameters from .htaccess --- main/main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/main/main.c b/main/main.c index cc029d42c4..f65e08f310 100644 --- a/main/main.c +++ b/main/main.c @@ -434,6 +434,18 @@ 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 be read from the environment (?): * PHP_AUTO_PREPEND_FILE @@ -524,7 +536,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) -- 2.50.1