com php-src: Disabled external entities loading (cherry picked from commit afe98b7829d50806559acac9b530acb8283c3bf4): ext/soap/php_xml .c
| From: | Johannes Schlüter | Date: | Wed, 13 Feb 2013 20:51:13 +0000 |
| Subject: | com php-src: Disabled external entities loading (cherry picked from commit afe98b7829d50806559acac9b530acb8283c3bf4): ext/soap/php_xml .c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-71229@lists.php.net to get a copy of this message | ||
Commit: 8710d330dadf614d9ebb7e5d4dc62b4ce9c9eeda
Author: Dmitry Stogov <dmitry@zend.com> Thu, 7 Feb 2013 16:07:05 +0400
Committer: Johannes Schlüter <johannes@php.net> Wed, 13 Feb 2013 21:51:13 +0100
Parents: 71c63bcfc5456a59b090754cf0b0ba2815e1bf16
Branches: PHP-5..3.22
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8710d330dadf614d9ebb7e5d4dc62b4ce9c9eeda
Log:
Disabled external entities loading
(cherry picked from commit afe98b7829d50806559acac9b530acb8283c3bf4)
Changed paths:
M ext/soap/php_xml.c
Diff:
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c
index 65abed1..a69d071 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;