Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ PHP NEWS
Content-Length and reusing the connection. (Ilia Alshanetsky)
. Fixed bug GH-24315 (Harden SoapClient cross-origin redirect handling).
(Ilia Alshanetsky)
. SoapClient no longer bails out on WSDL and XML schema errors and on
invalid constructor options, which kept the cycle collector disabled for
the rest of the request (GH-10026). (Valery Ivashchanka)
. SoapClient no longer bails out on errors in encoding a request or decoding
a response, which kept the cycle collector disabled for the rest of the
request (GH-10026). (Valery Ivashchanka)

- SPL:
. Fixed bug GH-23385 (SplDoublyLinkedList::serialize() use-after-free when
Expand Down
153 changes: 104 additions & 49 deletions ext/soap/php_encoding.c

Large diffs are not rendered by default.

24 changes: 20 additions & 4 deletions ext/soap/php_packet_soap.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,17 +261,22 @@ bool parse_packet_soap(zval *this_ptr, zend_string *buffer, sdlFunctionPtr fn, z
master_to_zval_with_doc_cleanup(&details, NULL, tmp, response);
}
}
add_soap_fault(this_ptr, faultcode, faultstring ? ZSTR_VAL(faultstring) : NULL, faultactor, &details, lang);
if (SOAP_ENCODING_ERROR_THROWN()) {
/* Decoding the fault failed, the client reports that error instead */
zval_ptr_dtor(&details);
} else {
add_soap_fault(this_ptr, faultcode, faultstring ? ZSTR_VAL(faultstring) : NULL, faultactor, &details, lang);
if (Z_REFCOUNTED(details)) {
Z_DELREF(details);
}
}
if (faultstring) {
zend_string_release_ex(faultstring, 0);
}
if (faultactor) {
zend_string_release_ex(faultactor, 0);
}
zend_string_release_ex(lang, false);
if (Z_REFCOUNTED(details)) {
Z_DELREF(details);
}
xmlFreeDoc(response);
return false;
}
Expand Down Expand Up @@ -442,12 +447,23 @@ bool parse_packet_soap(zval *this_ptr, zend_string *buffer, sdlFunctionPtr fn, z
smart_str_free(&key);
}
master_to_zval_with_doc_cleanup(&val, enc, trav, response);
if (SOAP_ENCODING_ERROR_THROWN()) {
/* The trace of the SoapFault shares the array of output headers */
zval_ptr_dtor(&val);
break;
}
add_assoc_zval(soap_headers, (const char*)trav->name, &val);
}
trav = trav->next;
}
}

if (SOAP_ENCODING_ERROR_THROWN()) {
/* The result is incomplete */
zval_ptr_dtor(return_value);
ZVAL_NULL(return_value);
}

xmlFreeDoc(response);
return true;
}
Loading
Loading