]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #38993 (Fixed safe_mode/open_basedir checks for
authorIlia Alshanetsky <iliaa@php.net>
Sun, 1 Oct 2006 21:00:00 +0000 (21:00 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 1 Oct 2006 21:00:00 +0000 (21:00 +0000)
session.save_path, allowing them to account for extra parameters).

ext/session/session.c
ext/standard/basic_functions.c

index a6a7e90431c93bc8b8196403d684f8ccd027293f..a4b88806720f6b8ae91253a7ae01ec510f04c30c 100644 (file)
@@ -151,7 +151,15 @@ static PHP_INI_MH(OnUpdateSaveDir)
 {
        /* Only do the safemode/open_basedir check at runtime */
        if (stage == PHP_INI_STAGE_RUNTIME) {
-               if (php_check_open_basedir(new_value TSRMLS_CC)) {
+               char *p;
+
+               if ((p = zend_memrchr(new_value, ';', new_value_length))) {
+                       p++;
+               } else {
+                       p = new_value;
+               }
+
+               if (php_check_open_basedir(p TSRMLS_CC)) {
                        return FAILURE;
                }
        }
index e215355b329ed5d1fb18836f63bdad22f85fcabe..0749d92e9259f0f9d6aa25e46d37627967919f01 100644 (file)
@@ -5660,7 +5660,6 @@ PHP_FUNCTION(ini_set)
                        _CHECK_PATH(varname, "java.class.path") ||
                        _CHECK_PATH(varname, "java.home") ||
                        _CHECK_PATH(varname, "java.library.path") ||
-                       _CHECK_PATH(varname, "session.save_path") ||
                        _CHECK_PATH(varname, "vpopmail.directory")) {
                        
                        if (php_check_open_basedir(Z_STRVAL_PP(new_value) TSRMLS_CC)) {