From: Christoph M. Becker Date: Tue, 30 Jun 2020 08:48:58 +0000 (+0200) Subject: Merge branch 'PHP-7.4' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c11d8fedb8738e6e11eb8b87e3ef88b85ed049a;p=php Merge branch 'PHP-7.4' * PHP-7.4: Fix #70362: Can't copy() large 'data://' with open_basedir --- 8c11d8fedb8738e6e11eb8b87e3ef88b85ed049a diff --cc ext/standard/file.c index cdd6d767db,a68db967f1..763409d181 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@@ -1603,10 -1659,10 +1603,10 @@@ PHP_FUNCTION(copy Z_PARAM_PATH(source, source_len) Z_PARAM_PATH(target, target_len) Z_PARAM_OPTIONAL - Z_PARAM_RESOURCE_EX(zcontext, 1, 0) + Z_PARAM_RESOURCE_OR_NULL(zcontext) ZEND_PARSE_PARAMETERS_END(); - if (php_check_open_basedir(source)) { + if (php_stream_locate_url_wrapper(source, NULL, 0) == &php_plain_files_wrapper && php_check_open_basedir(source)) { RETURN_FALSE; }