]> granicus.if.org Git - php/commitdiff
retore open_basedir check for unlink
authorStanislav Malyshev <stas@php.net>
Sun, 31 Jul 2011 22:43:21 +0000 (22:43 +0000)
committerStanislav Malyshev <stas@php.net>
Sun, 31 Jul 2011 22:43:21 +0000 (22:43 +0000)
main/streams/plain_wrapper.c

index 8303adb5b12083f89da81934ccd089586a40819e..c54ccd2ccffe91c848c3367108650a6442e7c9e5 100644 (file)
@@ -1035,6 +1035,10 @@ static int php_plain_files_unlink(php_stream_wrapper *wrapper, char *url, int op
                url = p + 3;
        }
 
+       if (php_check_open_basedir(url TSRMLS_CC)) {
+               return 0;
+       }
+
        ret = VCWD_UNLINK(url);
        if (ret == -1) {
                if (options & REPORT_ERRORS) {