]> granicus.if.org Git - php/commitdiff
always check save_path (issue reported by Maksymilian Arciemowicz)
authorStanislav Malyshev <stas@php.net>
Tue, 10 Jul 2007 17:52:32 +0000 (17:52 +0000)
committerStanislav Malyshev <stas@php.net>
Tue, 10 Jul 2007 17:52:32 +0000 (17:52 +0000)
ext/session/mod_files.c

index 32f8abcc364cf2ec01f8dc3dc25c8a67a5019e7e..89395fc0ada719155d539455846f722acb75fd34 100644 (file)
@@ -313,6 +313,10 @@ PS_OPEN_FUNC(files)
        }
        save_path = argv[argc - 1];
 
+       if (PG(open_basedir) && php_check_open_basedir(save_path TSRMLS_CC)) {
+               return FAILURE;
+       }
+
        data = ecalloc(1, sizeof(*data));
        
        data->fd = -1;