summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/soap/php_packet_soap.c4
-rw-r--r--ext/soap/soap.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c
index 0179ff1828..cc5a352bc2 100644
--- a/ext/soap/php_packet_soap.c
+++ b/ext/soap/php_packet_soap.c
@@ -24,6 +24,10 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction
add_soap_fault(this_ptr, "SOAP-ENV:Client", "looks like we got no XML document", NULL, NULL TSRMLS_CC);
return FALSE;
}
+ if (xmlGetIntSubset(response) != NULL) {
+ add_soap_fault(this_ptr, "SOAP-ENV:Client", "DTD are not supported by SOAP", NULL, NULL TSRMLS_CC);
+ return FALSE;
+ }
/* Get <Envelope> element */
env = NULL;
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 789b5b068d..652e928fa1 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -1051,6 +1051,9 @@ PHP_METHOD(soapserver, handle)
if (doc_request == NULL) {
php_error(E_ERROR, "Bad Request");
}
+ if (xmlGetIntSubset(doc_request) != NULL) {
+ php_error(E_ERROR,"DTD are not supported by SOAP");
+ }
SOAP_GLOBAL(sdl) = service->sdl;
deseralize_function_call(service->sdl, doc_request, &function_name, &num_params, &params, &soap_version TSRMLS_CC);