Repository navigation
remove remaining support for legacy IIS rewrite headers - #242
Open
falkenhawk wants to merge 2 commits into
Open
falkenhawk wants to merge 2 commits into
falkenhawk wants to merge 2 commits into
Conversation
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.
followup to #197
#197 stopped
Zend_Controller_Request_Httpfrom trusting theX-Original-URLandX-Rewrite-URLheaders (ZF2018-01).Any client can send these headers, so trusting them lets a request change the URL the application sees.
That can bypass access rules of the web server or a proxy, and poison caches.
Four more places still trusted them:
Zend_Controller_Request_Apache404- the same issue as inZend_Controller_Request_Http:X-Rewrite-URLwins overREDIRECT_URLfor routingZend_OpenId::selfUrl()-Zend_OpenId_Consumercompares theopenid.return_toof a login response with itZend_Soap_AutoDiscover- the endpoint URL written into the generated WSDLZend_Feed_Pubsubhubbub_CallbackAbstract::_detectCallbackUrl()- not called by ZF1 itself, but available to subclasses. zend-feed removed the headers there as part of ZF2018-01 (laminas/laminas-feed@b28589c).For example, with
Zend_Controller_Request_Apache404this request is routed to/admin:Backwards compatibility
The same as for #197: only setups relying on these IIS-specific headers are affected.
The URL now always comes from the server variables set by the web server.
Also fixed
Zend_Controller_Request_Http::setRequestUri()still listedHTTP_X_REWRITE_URL_detectCallbackUrl()and_getHttpHost()read$_SERVER['HTTPS']without checking that it exists, which raises a warning on plain http