You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by gb...@apache.org on 2024/11/13 08:29:46 UTC
svn commit: r1921873 - /spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Redirectors.pm
Author: gbechis
Date: Wed Nov 13 08:29:45 2024
New Revision: 1921873
URL: http://svn.apache.org/viewvc?rev=1921873&view=rev
Log:
catch more Google redirectors
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Redirectors.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Redirectors.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Redirectors.pm?rev=1921873&r1=1921872&r2=1921873&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Redirectors.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Redirectors.pm Wed Nov 13 08:29:45 2024
@@ -720,6 +720,12 @@ sub _check_redirector_uri {
# on the www domain
elsif($levels == 2 && $host =~ /^www\.([^.]+\.[^.]+)$/i) {
my $domain = $1;
+ if ($newuri = _check_querystring($params, $conf)) {
+ return {
+ 'uri' => $newuri,
+ 'method' => 'head',
+ };
+ }
if(($host eq "www.$domain") and exists $conf->{url_redirector}->{$domain}) {
dbg("Found internal www redirection for domain $domain");
return {
@@ -727,12 +733,6 @@ sub _check_redirector_uri {
'method' => $conf->{url_redirector}->{$domain} == 1 ? 'head' : 'get',
};
}
- if ($newuri = _check_querystring($params, $conf)) {
- return {
- 'uri' => $newuri,
- 'method' => 'head',
- };
- }
}
# if domain is a 3rd level domain check if there is a url redirector
# on the 2nd level tld
@@ -767,7 +767,7 @@ sub _check_querystring {
my $rreg = $conf->{url_redirector_params};
# Check parameters regexp and https:// in the querystring
- if (($params =~ /$rreg/gis) or ($params =~ /(?:\/|\_)https?:\/\/(.*)/)) {
+ if (($params =~ /$rreg/gis) or ($params =~ /(?:\/|\_|\=)https?:\/\/(.*)/)) {
dbg("Found redirection with path $params");
my $newuri = $1;
if($newuri !~ /^http/) {