svn commit: r1936954 - in spamassassin/trunk: lib/Mail/SpamAssassin t

[email protected]
Newsgroups gmane.mail.spam.spamassassin.cvs
Message-ID <178609727808.3468773.14870688367516077593@svn03-he-fi>
Author: gbechis
Date: Fri Aug  7 10:07:57 2026
New Revision: 1936954

Log:
skip data:image/png uris, they're not domains.
bz #8405

Modified:
   spamassassin/trunk/lib/Mail/SpamAssassin/RegistryBoundaries.pm
   spamassassin/trunk/t/uri.t

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/RegistryBoundaries.pm
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/RegistryBoundaries.pm	Fri Aug  7 09:51:54 2026	(r1936953)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/RegistryBoundaries.pm	Fri Aug  7 10:07:57 2026	(r1936954)
@@ -250,8 +250,8 @@ sub uri_to_domain {
   my $uri = lc shift;
 
   # Javascript is not going to help us, so return.
-  # Likewise ignore cid, file
-  return if ($uri =~ /^(?:javascript|cid|file):/);
+  # Likewise ignore cid, file, data
+  return if ($uri =~ /^(?:javascript|cid|file|data):/);
 
   if ($uri =~ s/^mailto://) { # handle mailto: specially
     $uri =~ s/\?.*//;			# drop parameters ?subject= etc

Modified: spamassassin/trunk/t/uri.t
==============================================================================
--- spamassassin/trunk/t/uri.t	Fri Aug  7 09:51:54 2026	(r1936953)
+++ spamassassin/trunk/t/uri.t	Fri Aug  7 10:07:57 2026	(r1936954)
@@ -8,7 +8,7 @@ use SATest; sa_t_init("uri");
 use constant HAS_LIBIDN => eval { require Net::LibIDN; };
 use constant HAS_LIBIDN2 => eval { require Net::LibIDN2; };
 
-my $tests = 106;
+my $tests = 107;
 $tests += 7 if (HAS_LIBIDN);
 $tests += 7 if (HAS_LIBIDN2);
 
@@ -81,6 +81,7 @@ ok(try_domains('mailto:[email protected]
 ok(try_domains('mailto:[email protected]?subject=foo', 'example.com'));
 ok(try_domains('mailto:nobody', undef));
 ok(try_domains('cid:foobar.net', undef));
+ok(try_domains('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB', undef));
 ok(try_domains('http://66.92.69.221/', '66.92.69.221'));
 ok(try_domains('http://www.spamassassin.org:8080/lists.html', 'spamassassin.org'));
 ok(try_domains('http://www.spamassassin.org/lists.html#some_tag', 'spamassassin.org'));
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.