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/10/28 16:39:35 UTC
svn commit: r1921622 - /spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm
Author: gbechis
Date: Mon Oct 28 16:39:35 2024
New Revision: 1921622
URL: http://svn.apache.org/viewvc?rev=1921622&view=rev
Log:
remove trailing slash from the shortened uri
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm?rev=1921622&r1=1921621&r2=1921622&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm Mon Oct 28 16:39:35 2024
@@ -796,7 +796,7 @@ sub _check_short {
my $info = $uris->{$uri};
next unless $info->{domains} && $info->{cleaned};
# Remove anchors and parameters from shortened uris
- $uri =~ s/(?:\#|\?).*//g;
+ $uri =~ s/\/?(?:\#|\?).*//g;
if (my $short_url_info = _check_shortener_uri($uri, $conf)) {
$short_urls{$uri} = $short_url_info;
last if scalar keys %short_urls >= $conf->{max_short_urls};