From cc1b19cf0e57b8b288788c592214d7aa6cc2e495 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Wed, 24 Jan 2007 21:43:47 +0000 Subject: Expand allow_url_fopen/allow_url_include functionality --- ext/soap/php_xml.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'ext/soap/php_xml.c') 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; -- cgit v1.2.1