Re: cvs: php-src(PHP_5_2) /main main.c
| From: | Jani Taskinen | Date: | Fri, 14 Sep 2007 08:53:09 +0000 |
| Subject: | Re: cvs: php-src(PHP_5_2) /main main.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-46176@lists.php.net to get a copy of this message | ||
Isn't it a bit easier to just make it PHP_INI_SYSTEM since you can't set
it anyplace else than php.ini now..? Somehow this patch feels a bit
overkill to me now. :)
--Jani
On Thu, 2007-09-13 at 20:04 +0000, Stanislav Malyshev wrote:
> stas Thu Sep 13 20:04:23 2007 UTC
>
> Modified files: (Branch: PHP_5_2)
> /php-src/main main.c
> Log:
> disallow setting mail.force_extra_parameters from .htaccess
>
>
>
> http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.54&r2=1.640.2.23.2.55&diff_format=u
> Index: php-src/main/main.c
> diff -u php-src/main/main.c:1.640.2.23.2.54 php-src/main/main.c:1.640.2.23.2.55
> --- php-src/main/main.c:1.640.2.23.2.54 Fri Aug 31 08:35:37 2007
> +++ php-src/main/main.c Thu Sep 13 20:04:22 2007
> @@ -18,7 +18,7 @@
> +----------------------------------------------------------------------+
> */
>
> -/* $Id: main.c,v 1.640.2.23.2.54 2007/08/31 08:35:37 jani Exp $ */
> +/* $Id: main.c,v 1.640.2.23.2.55 2007/09/13 20:04:22 stas Exp $ */
>
> /* {{{ includes
> */
> @@ -318,6 +318,19 @@
> }
> /* }}} */
>
> +/* {{{ 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_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)
>
>
--
Patches/Donations: http://pecl.php.net/~jani/