Skip to content

Commit 8710d33

Browse files
dstogovjohannes
authored andcommitted
Disabled external entities loading
(cherry picked from commit afe98b7)
1 parent 71c63bc commit 8710d33

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/soap/php_xml.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC)
9292
PG(allow_url_fopen) = old_allow_url_fopen;
9393
if (ctxt) {
9494
ctxt->keepBlanks = 0;
95+
ctxt->options -= XML_PARSE_DTDLOAD;
9596
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;
9697
ctxt->sax->comment = soap_Comment;
9798
ctxt->sax->warning = NULL;
@@ -133,6 +134,7 @@ xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size)
133134
*/
134135
ctxt = xmlCreateMemoryParserCtxt(buf, buf_size);
135136
if (ctxt) {
137+
ctxt->options -= XML_PARSE_DTDLOAD;
136138
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;
137139
ctxt->sax->comment = soap_Comment;
138140
ctxt->sax->warning = NULL;

0 commit comments

Comments
 (0)