Re: cvs: php-src(PHP_5_2) /ext/session mod_files.c session.c
| From: | Hannes Magnusson | Date: | Mon, 06 Apr 2009 11:55:29 +0000 |
| Subject: | Re: cvs: php-src(PHP_5_2) /ext/session mod_files.c session.c | ||
| References: | 1 | Groups: | php.cvs php.internals |
| Request: | Send a blank email to internals+get-43635@lists.php.net to get a copy of this message | ||
On Sat, Mar 3, 2007 at 17:07, Ilia Alshanetsky <iliaa@php.net> wrote:
> iliaa Sat Mar 3 15:07:31 2007 UTC
>
> Modified files: (Branch: PHP_5_2)
> /php-src/ext/session session.c mod_files.c
> Log:
> Adjust checks to allow paths without a trailing /
>
>
[...]
>
> http://cvs.php.net/viewvc.cgi/php-src/ext/session/mod_files.c?r1=1.100.2.3.2.4&r2=1.100.2.3.2.5&diff_format=u
> Index: php-src/ext/session/mod_files.c
> diff -u php-src/ext/session/mod_files.c:1.100.2.3.2.4
> php-src/ext/session/mod_files.c:1.100.2.3.2.5
> --- php-src/ext/session/mod_files.c:1.100.2.3.2.4 Thu Jan 4 23:49:35 2007
> +++ php-src/ext/session/mod_files.c Sat Mar 3 15:07:31 2007
> @@ -16,7 +16,7 @@
> +----------------------------------------------------------------------+
> */
>
> -/* $Id: mod_files.c,v 1.100.2.3.2.4 2007/01/04 23:49:35 iliaa Exp $ */
> +/* $Id: mod_files.c,v 1.100.2.3.2.5 2007/03/03 15:07:31 iliaa Exp $ */
>
> #include "php.h"
>
> @@ -252,11 +252,13 @@
> /* if save path is an empty string, determine the temporary dir */
> save_path = php_get_temporary_directory();
>
> - if (PG(safe_mode) && (!php_checkuid(save_path, NULL,
> CHECKUID_ALLOW_ONLY_DIR))) {
> - return FAILURE;
> - }
> - if (php_check_open_basedir(save_path TSRMLS_CC)) {
> - return FAILURE;
> + if (strcmp(save_path, "/tmp")) {
> + if (PG(safe_mode) && (!php_checkuid(save_path, NULL,
> CHECKUID_CHECK_FILE_AND_DIR))) {
> + return FAILURE;
> + }
> + if (php_check_open_basedir(save_path TSRMLS_CC)) {
> + return FAILURE;
> + }
> }
> }
>
Any special reason this was never merged into 5.3?
-Hannes