summaryrefslogtreecommitdiff
path: root/main/user_streams.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-09-23 18:18:40 +0000
committerWez Furlong <wez@php.net>2002-09-23 18:18:40 +0000
commitc6fdce6891dfa10d32596687c28b35c0a9be2203 (patch)
tree88b29fe22874d7ae0681c745acf91aca3ca09766 /main/user_streams.c
parentd14a7e0c19cc6753e40a22f285651c95a45d0a0a (diff)
downloadphp-git-c6fdce6891dfa10d32596687c28b35c0a9be2203.tar.gz
Remove allow_url_fopen checks from the user streams code.
Rationale: user streams might not be implementing network access, and the administrator can disable the file_register_wrapper function and other network access functions if s/he does not want to allow this functionality.
Diffstat (limited to 'main/user_streams.c')
-rw-r--r--main/user_streams.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/main/user_streams.c b/main/user_streams.c
index cce999da58..a6aff3cb8a 100644
--- a/main/user_streams.c
+++ b/main/user_streams.c
@@ -221,18 +221,12 @@ PHP_FUNCTION(file_register_wrapper)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &protocol, &protocol_len, &classname, &classname_len) == FAILURE) {
RETURN_FALSE;
}
-
- if (!PG(allow_url_fopen)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "fopen wrappers have been disabled");
- RETURN_FALSE;
- }
uwrap = (struct php_user_stream_wrapper *)ecalloc(1, sizeof(*uwrap));
uwrap->protoname = estrndup(protocol, protocol_len);
uwrap->classname = estrndup(classname, classname_len);
uwrap->wrapper.wops = &user_stream_wops;
uwrap->wrapper.abstract = uwrap;
- uwrap->wrapper.is_url = 1; /* allow safe_mode to disallow this wrapper if enabled */
zend_str_tolower(uwrap->classname, classname_len);
rsrc_id = ZEND_REGISTER_RESOURCE(NULL, uwrap, le_protocols);