From fc3a62ed48633567ccf7ccad4cd4bf01de64ccf2 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Wed, 14 Mar 2007 12:06:20 +0000 Subject: [PATCH] - MFH: openbasedir and safemode check in ::open() --- ext/zip/php_zip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 88e5e88e12..f99450e425 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -917,6 +917,10 @@ static ZIPARCHIVE_METHOD(open) RETURN_FALSE; } + if (OPENBASEDIR_CHECKPATH(filename)) { + RETURN_FALSE; + } + if (!expand_filepath(filename, resolved_path TSRMLS_CC)) { RETURN_FALSE; } -- 2.50.1