]> granicus.if.org Git - php/commitdiff
Added missing safe_mode & open_basedir checks.
authorIlia Alshanetsky <iliaa@php.net>
Sun, 17 Apr 2005 18:05:03 +0000 (18:05 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 17 Apr 2005 18:05:03 +0000 (18:05 +0000)
ext/xmlreader/php_xmlreader.c

index 191f878c919c91f9495780f2827ce31ad019d849..1de031aa5130f4660949190818044e6c5d52a864 100644 (file)
@@ -229,6 +229,14 @@ char *_xmlreader_get_valid_file_path(char *source, char *resolved_path, int reso
 
        xmlFreeURI(uri);
 
+       if (PG(safe_mode) && (!php_checkuid(file_dest, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
+               return NULL;
+       }
+
+       if (php_check_open_basedir(file_dest TSRMLS_CC)) {
+               return NULL;
+       }
+
        return file_dest;
 }