fkoyer opened a new pull request, #52:
URL: https://github.com/apache/spamassassin/pull/52

   When a configured url_redirector/url_redirector_get host returned a response 
that was not an HTTP redirect (no Location header), the plugin abandoned the 
URL. Services such as google.com/url now answer 200 with a JS/meta-refresh 
interstitial rather than a 30x, so the real destination carried in the 
querystring (e.g. ?q=https://evil.example/) was dropped and never reached the 
URI detail list.
   
   _walk_redirects now falls through to the existing embedded-URI extraction 
when _do_http returns no location for a matched redirector, instead of 
returning, so the querystring target is recovered and followed.
   
   While here, make redir_url_code() consistent between a live fetch and a 
cache hit. The cache stores either a 3-digit status code or a destination URL 
per redirector; a cache hit can only reproduce redir_url_<code> for an entry 
stored as a code. So a status code is now recorded only for responses that are 
stored as a code and are not followed as a redirect:
   
     - a plain 200 with no meta-refresh (a terminal non-redirect) records 
redir_url_200 and caches "200"; redir_url_code('200') and short_url_200() now 
work, and fire identically whether or not the URL was cached. This also lets an 
administrator find url_redirector entries that are no longer really redirectors.
     - a genuine server 500 records redir_url_500; an LWP-synthesized 500 
(Client-Warning: Internal response, i.e. a client-side DNS/timeout/TLS failure) 
records nothing.
     - a real 30x redirect and a meta-refresh 200 are followed but record no 
code, since the cache holds their destination URL, not a code. The Selenium 
branch is brought in line with the same rule.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to