summaryrefslogtreecommitdiff
path: root/ext/soap/php_xml.c
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2007-01-24 21:43:47 +0000
committerSara Golemon <pollita@php.net>2007-01-24 21:43:47 +0000
commitcc1b19cf0e57b8b288788c592214d7aa6cc2e495 (patch)
tree6f66777cfb92109e2d140b5c4a0a3a35a1adf7d3 /ext/soap/php_xml.c
parentffcf9f5de4446b74dd4ab23c3068271369dd2953 (diff)
downloadphp-git-cc1b19cf0e57b8b288788c592214d7aa6cc2e495.tar.gz
Expand allow_url_fopen/allow_url_include functionality
Diffstat (limited to 'ext/soap/php_xml.c')
-rw-r--r--ext/soap/php_xml.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c
index 2e36751c26..c5dbd640de 100644
--- a/ext/soap/php_xml.c
+++ b/ext/soap/php_xml.c
@@ -80,16 +80,19 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC)
{
xmlParserCtxtPtr ctxt = NULL;
xmlDocPtr ret;
- zend_bool old_allow_url_fopen;
+ char *old_allow_url_fopen_list;
/*
xmlInitParser();
*/
- old_allow_url_fopen = PG(allow_url_fopen);
- zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), "1", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
+ old_allow_url_fopen_list = PG(allow_url_fopen_list);
+ if (!old_allow_url_fopen_list) {
+ old_allow_url_fopen_list = "";
+ }
+ zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), "*", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
ctxt = xmlCreateFileParserCtxt(filename);
- zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), old_allow_url_fopen ? "1" : "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
+ zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), old_allow_url_fopen_list, strlen(old_allow_url_fopen_list), PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
if (ctxt) {
ctxt->keepBlanks = 0;
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;