about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/View.pm2
-rw-r--r--lib/PublicInbox/WWW.pm2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 326da4cb..2303a1fa 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -262,7 +262,7 @@ sub attach_link ($$$$) {
         $desc = '' unless defined $desc;
         $desc = ': '.$desc if $desc;
         my $sfn;
-        if (defined $fn && $fn =~ /\A[\w-]+\.[a-z0-9]+\z/) {
+        if (defined $fn && $fn =~ /\A[\w\.-]+[a-zA-Z0-9]\z/) {
                 $sfn = $fn;
         } elsif ($ct eq 'text/plain') {
                 $sfn = 'a.txt';
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index f87f4171..10c2e7ca 100644
--- a/lib/PublicInbox/WWW.pm
+++ b/lib/PublicInbox/WWW.pm
@@ -23,7 +23,7 @@ use PublicInbox::GitHTTPBackend;
 our $INBOX_RE = qr!\A/([\w\.\-]+)!;
 our $MID_RE = qr!([^/]+)!;
 our $END_RE = qr!(T/|t/|R/|t\.mbox(?:\.gz)?|t\.atom|raw|)!;
-our $ATTACH_RE = qr!(\d[\.\d]*)-([\w-]+\.[a-z0-9]+)!i;
+our $ATTACH_RE = qr!(\d[\.\d]*)-([\w\.-]+[a-zA-Z0-9])!i;
 
 sub new {
         my ($class, $pi_config) = @_;