stas Thu Sep 13 20:06:15 2007 UTC
Modified files:
/php-src/main main.c
Log:
MFB: disallow setting mail.force_extra_parameters from .htaccess
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.746&r2=1.747&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.746 php-src/main/main.c:1.747
--- php-src/main/main.c:1.746 Fri Aug 31 08:35:07 2007
+++ php-src/main/main.c Thu Sep 13 20:06:15 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.746 2007/08/31 08:35:07 jani Exp $ */
+/* $Id: main.c,v 1.747 2007/09/13 20:06:15 stas Exp $ */
/* {{{ includes
*/
@@ -434,6 +434,18 @@
}
/* }}} */
+/* {{{ 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_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)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php