From 5d0a261394d9a97aaf0036a308fa70ffe558cd8d Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 10 Jul 2007 17:52:32 +0000 Subject: [PATCH] always check save_path (issue reported by Maksymilian Arciemowicz) --- ext/session/mod_files.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index 32f8abcc36..89395fc0ad 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -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; -- 2.50.1