-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix #49169: SoapServer calls wrong function, although "SOAP action" header is correct #15970
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
Conversation
soap_action_length--; | ||
} | ||
|
||
/* TODO: This may depend on a particular target namespace, in which case this won't find a match when multiple different |
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.
As stated by the TODO, this may require more work but depends on another fix.
Reconstructed test case: https://gist.github.com/nielsdos/03b758daf961fa335d4aedba8dd33d16 |
cc @cmb69 You seem to have some SOAP knowledge, perhaps you are interested in sanity checking this? |
48ff6e7
to
7fe2c05
Compare
The failure was because of 2 missing NULL checks, one for the SDL, and one for the binding attributes. Remaining failures are unrelated. |
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.
Overall this looks sensible, but maybe wait for master
to be 8.5 rather than 8.4?
Not really. :(
Given that this is a bug fix, I think 8.4 is fine. On the other hand, the bug has been reported 15 years ago, so having to wait another year for the fix might be bearable. |
I'm okay with waiting for 8.5 to put through a bunch of fixes into SOAP. |
This is in preparation for adding functionality in later commits.
…eader is correct Although the original reproducer no longer exists, I was able to cook up something similar. The problem is that there are two ways ext-soap currently looks up functions: 1) By matching the exact function name; but this doesn't work if the function name is not in the body. 2) By matching the parameter names. Neither of these work when we don't have the function name in the body, and when the parameter names are not unique. That's where we can use the "SOAPAction" header to distinguish between different actions. This header should be checked first and be matched against the "soapAction" attribute in the WSDL. We keep the existing fallbacks such that the chance of a BC break is minimized. Note that since #49169 a potential target namespace is ignored right now.
Rebased on current master so entire CI can test. |
If no one objects I'll merge on monday |
…eader is correct Although the original reproducer no longer exists, I was able to cook up something similar. The problem is that there are two ways ext-soap currently looks up functions: 1) By matching the exact function name; but this doesn't work if the function name is not in the body. 2) By matching the parameter names. Neither of these work when we don't have the function name in the body, and when the parameter names are not unique. That's where we can use the "SOAPAction" header to distinguish between different actions. This header should be checked first and be matched against the "soapAction" attribute in the WSDL. We keep the existing fallbacks such that the chance of a BC break is minimized. Note that since #49169 a potential target namespace is ignored right now. Closes phpGH-15970.
…eader is correct Although the original reproducer no longer exists, I was able to cook up something similar. The problem is that there are two ways ext-soap currently looks up functions: 1) By matching the exact function name; but this doesn't work if the function name is not in the body. 2) By matching the parameter names. Neither of these work when we don't have the function name in the body, and when the parameter names are not unique. That's where we can use the "SOAPAction" header to distinguish between different actions. This header should be checked first and be matched against the "soapAction" attribute in the WSDL. We keep the existing fallbacks such that the chance of a BC break is minimized. Note that since #49169 a potential target namespace is ignored right now. Closes phpGH-15970.
See individual commits and their descriptions.
Sending to master because the fix is fairly non-trivial.