diff options
author | Eric Wong <e@yhbt.net> | 2020-06-19 17:18:47 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-07-07 06:04:45 +0000 |
commit | c0f3095c2f0fdf3409a2d7bc629230cd83a06f9f (patch) | |
tree | 9bc662c87f33dbb6569ee160956fa429b98cd4e1 /lib | |
parent | fb17a1456179b92a309c66bf17b71cc4a6ea7bfc (diff) | |
download | public-inbox-c0f3095c2f0fdf3409a2d7bc629230cd83a06f9f.tar.gz |
I'm not sure why this wasn't done in Jun/July 2016 when I was working on PublicInbox::Address to replace the DoS-vulnerable Email::Address. Nowadays, PublicInbox::Address allows using Email::Address::XS which should be fast and robust.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/MDA.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/MDA.pm b/lib/PublicInbox/MDA.pm index 57b436b9..fa4a2ad8 100644 --- a/lib/PublicInbox/MDA.pm +++ b/lib/PublicInbox/MDA.pm @@ -6,6 +6,7 @@ package PublicInbox::MDA; use strict; use warnings; use PublicInbox::MsgTime; +use PublicInbox::Address; use constant MAX_SIZE => 1024 * 500; # same as spamc default, should be tunable use constant MAX_MID_SIZE => 244; # max term size - 1 in Xapian @@ -62,7 +63,7 @@ sub alias_specified { } @address; foreach my $line ($simple->header('Cc'), $simple->header('To')) { - my @addrs = ($line =~ /([^,<\s]+\@[^,>\s]+)/g); + my @addrs = PublicInbox::Address::emails($line); foreach my $addr (@addrs) { if ($ok{lc(__drop_plus($addr))}) { return 1; |