Repository navigation
Conversation
iliaal
force-pushed
the
fix/gh-24315-soap-cross-origin-redirect
branch
2 times, most recently
from
October 14, 2026 11:52
cd8e787 to
1be1612
Compare
SoapClient followed any Location header, so a redirect to another host, port, or scheme resent the HTTP authentication credentials, the stream context headers, and the SOAP envelope to that origin. Such redirects now fail with a SoapFault. A same-host upgrade from http to https on port 443 is still followed. The new follow_cross_origin_redirects option restores the previous behavior. Cookies were already scoped by domain and Proxy-Authorization only reaches the proxy, so neither changes. Fixes phpGH-24315
iliaal
force-pushed
the
fix/gh-24315-soap-cross-origin-redirect
branch
from
October 14, 2026 13:12
1be1612 to
79f3773
Compare
Owner
Author
|
Submitted upstream as php#24329. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
SoapClient followed any Location header and resent the HTTP authentication credentials, the stream context headers, and the SOAP envelope to whatever origin it named. Redirects to a different scheme, host, or port now fail with a SoapFault, except a same-host upgrade from http to https on port 443.
The issue notes that stripping credentials would still forward the envelope, so this rejects the redirect instead. That is stricter than the http stream wrapper used for WSDL fetches, which strips Authorization and Cookie on a cross-origin redirect (5af9465) and also counts http to https as cross-origin. Master only, since it changes behavior; UPGRADING carries the note.
Fixes php#24315