diff options
author | Dmitry Stogov <dmitry@zend.com> | 2013-02-07 16:07:05 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2013-02-07 16:07:05 +0400 |
commit | afe98b7829d50806559acac9b530acb8283c3bf4 (patch) | |
tree | 63e8c6916e1958b8f2cd4fb98702bfd599281d06 | |
parent | cc4c318b0c71e1a9c9cf803b5ee5d437344d64db (diff) | |
download | php-git-afe98b7829d50806559acac9b530acb8283c3bf4.tar.gz |
Disabled external entities loading
-rw-r--r-- | ext/soap/php_xml.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c index 65abed171a..a69d071164 100644 --- a/ext/soap/php_xml.c +++ b/ext/soap/php_xml.c @@ -92,6 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { ctxt->keepBlanks = 0; + ctxt->options -= XML_PARSE_DTDLOAD; ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace; ctxt->sax->comment = soap_Comment; ctxt->sax->warning = NULL; @@ -133,6 +134,7 @@ xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size) */ ctxt = xmlCreateMemoryParserCtxt(buf, buf_size); if (ctxt) { + ctxt->options -= XML_PARSE_DTDLOAD; ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace; ctxt->sax->comment = soap_Comment; ctxt->sax->warning = NULL; |