Repository navigation
Conversation
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 15, 2026 12:01
79f3773 to
8982dd6
Compare
devnexen
reviewed
Oct 15, 2026
| GH-24315 (SoapClient follows redirects to a different origin) | ||
| --EXTENSIONS-- | ||
| soap | ||
| openssl |
Member
Author
There was a problem hiding this comment.
soap just for completion really, not strictly needed,
openssl does have a purpose, the allowed HTTP-to-HTTPS upgrade case emits a missing-wrapper warning without OpenSSL. Catching SoapFault doesn't suppress it, so the test fails.
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 new follow_cross_origin_redirects SoapClient option restores the previous behavior for deployments that depend on it.
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 #24315