|
|
|
@ -161,11 +161,16 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC); |
|
|
|
strncasecmp(str, "file:", sizeof("file:") - 1) == 0) \ |
|
|
|
{ \ |
|
|
|
php_url *tmp_url; \ |
|
|
|
\ |
|
|
|
\ |
|
|
|
if (!(tmp_url = php_url_parse_ex(str, len))) { \ |
|
|
|
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid url '%s'", str); \ |
|
|
|
RETURN_FALSE; \ |
|
|
|
} \ |
|
|
|
\ |
|
|
|
if (php_memnstr(str, tmp_url->path, strlen(tmp_url->path), str + len)) { \ |
|
|
|
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Url '%s' contains unencoded control characters.", str); \ |
|
|
|
RETURN_FALSE; \ |
|
|
|
} \ |
|
|
|
\ |
|
|
|
if (tmp_url->query || tmp_url->fragment || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \ |
|
|
|
(PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \ |
|
|
|
|