diff options
author | Eric Wong <e@80x24.org> | 2019-06-04 02:04:28 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-06-04 10:06:18 +0000 |
commit | c5621af43e9c7cb1ff0565aa61a1d8fced55a23b (patch) | |
tree | 33bfcd44d136a3bd15869ce16229581574a8e6d9 /lib/PublicInbox/WWW.pm | |
parent | f8c8ca04d47620d390092000ca09aab071442fac (diff) | |
download | public-inbox-c5621af43e9c7cb1ff0565aa61a1d8fced55a23b.tar.gz |
We don't want to emit funky URLs which can be lost in translation or cause problems with non-Unicode-aware clients. Then, don't accept non-ASCII filenames in URLs, since a manually-generated URL/filename in attachment downloads could be used for Unicode homographs to confuse folks who down the attachment.
Diffstat (limited to 'lib/PublicInbox/WWW.pm')
-rw-r--r-- | lib/PublicInbox/WWW.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index b6f18f8d..50b6950c 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -28,7 +28,7 @@ use PublicInbox::UserContent; our $INBOX_RE = qr!\A/([\w\-][\w\.\-]*)!; our $MID_RE = qr!([^/]+)!; our $END_RE = qr!(T/|t/|t\.mbox(?:\.gz)?|t\.atom|raw|)!; -our $ATTACH_RE = qr!(\d[\.\d]*)-([[:alnum:]][\w\.-]+[[:alnum:]])!i; +our $ATTACH_RE = qr!([0-9][0-9\.]*)-($PublicInbox::Hval::FN)!; our $OID_RE = qr![a-f0-9]{7,40}!; sub new { |