wez             Mon Sep 23 14:18:41 2002 EDT

  Modified files:              
    /php4/main  user_streams.c 
  Log:
  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.
  
  
Index: php4/main/user_streams.c
diff -u php4/main/user_streams.c:1.21 php4/main/user_streams.c:1.22
--- php4/main/user_streams.c:1.21       Mon Sep 23 09:22:10 2002
+++ php4/main/user_streams.c    Mon Sep 23 14:18:40 2002
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: user_streams.c,v 1.21 2002/09/23 13:22:10 wez Exp $ */
+/* $Id: user_streams.c,v 1.22 2002/09/23 18:18:40 wez Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -221,18 +221,12 @@
        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);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to