You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@spamassassin.apache.org on 2021/03/15 08:24:42 UTC

[Bug 7891] spamassassin expands domain by wrong TLD

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7891

Henrik Krohns <ap...@hege.li> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |apache@hege.li

--- Comment #1 from Henrik Krohns <ap...@hege.li> ---

Yeah Util.pm / uri_list_canonicalize should probably only add .com to unknows
TLDs.

      # http://foobar -> http://www.foobar.com as Firefox does (Bug 6596)
      # (do this here so we don't trip on those 0x123 IPs etc..)
      #
https://hg.mozilla.org/mozilla-central/file/tip/docshell/base/nsDefaultURIFixup.cpp
      elsif ($proto eq 'http://' && $auth eq '' &&
             $nhost ne 'localhost' && $port eq '80' &&
             $nhost =~ /^(?:www\.)?([^.]+)$/) {
        push(@nuris, join('', $proto, 'www.', $1, '.com', $rest));

Schemeless uris are already known as valid, but this function has no knowledge
if the uri was originally schemeless or not. This function also does not have
any access to is_domain_valid function since Util.pm is standalone module.

I guess we could pass $self->{main}->{registryboundaries} as argument to
uri_list_canonicalize, so we can use it for this purpose.

sub uri_list_canonicalize {
  my($redirector_patterns, @uris, $rb) = @_;

-- 
You are receiving this mail because:
You are the assignee for the bug.