Repository navigation
Fix GH-25094: NULL dereference in SOAP get_doc_function() with missing parts #25101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lazerg
wants to merge
2
commits into
php:PHP-8.4
Choose a base branch
from
lazerg:fix/gh-25094-soap-doc-function
base: PHP-8.4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --TEST-- | ||
| GH-25094 (NULL pointer dereference in get_doc_function() when the request has fewer parts than the WSDL) | ||
| --CREDITS-- | ||
| cxxz16 | ||
| --EXTENSIONS-- | ||
| soap | ||
| --INI-- | ||
| soap.wsdl_cache_enabled=0 | ||
| --FILE-- | ||
| <?php | ||
| class TestService { | ||
| public function Test($a, $b) { | ||
| return $a; | ||
| } | ||
| } | ||
|
|
||
| $server = new SoapServer(__DIR__ . '/gh25094.wsdl'); | ||
| $server->setClass('TestService'); | ||
|
|
||
| $server->handle(<<<'XML' | ||
| <?xml version="1.0"?> | ||
| <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://test-uri"> | ||
| <SOAP-ENV:Body><tns:a>foo</tns:a></SOAP-ENV:Body> | ||
| </SOAP-ENV:Envelope> | ||
| XML); | ||
| ?> | ||
| --EXPECT-- | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Procedure 'a' not present</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" | ||
| xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" | ||
| xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
| xmlns:tns="http://test-uri" | ||
| targetNamespace="http://test-uri"> | ||
| <types> | ||
| <xsd:schema targetNamespace="http://test-uri" elementFormDefault="qualified"> | ||
| <xsd:element name="a" type="xsd:string"/> | ||
| <xsd:element name="b" type="xsd:string"/> | ||
| </xsd:schema> | ||
| </types> | ||
| <message name="TestRequest"> | ||
| <part name="a" element="tns:a"/> | ||
| <part name="b" element="tns:b"/> | ||
| </message> | ||
| <message name="TestResponse"> | ||
| <part name="r" element="tns:a"/> | ||
| </message> | ||
| <portType name="TestPortType"> | ||
| <operation name="Test"> | ||
| <input message="tns:TestRequest"/> | ||
| <output message="tns:TestResponse"/> | ||
| </operation> | ||
| </portType> | ||
| <binding name="TestBinding" type="tns:TestPortType"> | ||
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> | ||
| <operation name="Test"> | ||
| <soap:operation soapAction="http://test-uri/Test"/> | ||
| <input><soap:body use="literal"/></input> | ||
| <output><soap:body use="literal"/></output> | ||
| </operation> | ||
| </binding> | ||
| <service name="TestService"> | ||
| <port name="TestPort" binding="tns:TestBinding"> | ||
| <soap:address location="http://localhost/test"/> | ||
| </port> | ||
| </service> | ||
| </definitions> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
credits...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added cxxz16 under --CREDITS-- in 9e213bd.