diff options
author | Eric Wong <e@80x24.org> | 2019-06-04 10:38:20 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-06-04 10:38:20 +0000 |
commit | e56b908c0e97c2f479b350dfb0868bc463413b89 (patch) | |
tree | 6b8a8fc59840ebc3e6bee1bbb2e3a5e568bce351 /lib/PublicInbox/Inbox.pm | |
parent | d5c56e2a1adde279ff86fbd0be81a6b7e5ba0896 (diff) | |
parent | 91af69a41f2963f1f952cb0932ed23cd86cd1093 (diff) | |
download | public-inbox-e56b908c0e97c2f479b350dfb0868bc463413b89.tar.gz |
* charclass: (24 commits) www: require ASCII word characters for CSS filenames www: require ASCII range for mbox downloads githttpbackend: require ASCII in path require ASCII digits for local FS items www: require ASCII digit for git epoch solver|viewdiff: restrict digit matches to ASCII inbox: require ASCII digits for feedmax var filter/rubylang: require ASCII digit for mailcount msgtime: require ASCII digits for parsing dates searchview: do not allow non-ASCII offsets and limits githttpbackend: require Range:, Status: to be ASCII digits view: require YYYYmmDD(HHMMSS) timestamps to be ASCII newswww: only accept ASCII digits as article numbers config: do not accept non-ASCII digits in cgitrc params www: require ASCII filenames in git blob downloads www: only emit ASCII chars in attachment filenames wwwattach: only pass the charset through if ASCII wwwlisting: require ASCII digit for port number http: require SERVER_PORT to be ASCII digit feed: only accept ASCII digits for ref~$N ...
Diffstat (limited to 'lib/PublicInbox/Inbox.pm')
-rw-r--r-- | lib/PublicInbox/Inbox.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index b3178b98..c9330332 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -74,7 +74,7 @@ sub _set_uint ($$$) { my $val = $opts->{$field}; if (defined $val) { $val = $val->[-1] if ref($val) eq 'ARRAY'; - $val = undef if $val !~ /\A\d+\z/; + $val = undef if $val !~ /\A[0-9]+\z/; } $opts->{$field} = $val || $default; } @@ -87,7 +87,7 @@ sub _set_limiter ($$$) { my $mkey = $pfx.'max'; my $val = $self->{$mkey} or return; my $lim; - if ($val =~ /\A\d+\z/) { + if ($val =~ /\A[0-9]+\z/) { require PublicInbox::Qspawn; $lim = PublicInbox::Qspawn::Limiter->new($val); } elsif ($val =~ /\A[a-z][a-z0-9]*\z/) { @@ -161,7 +161,7 @@ sub max_git_part { if (opendir my $dh, $gits) { my $max = -1; while (defined(my $git_dir = readdir($dh))) { - $git_dir =~ m!\A(\d+)\.git\z! or next; + $git_dir =~ m!\A([0-9]+)\.git\z! or next; $max = $1 if $1 > $max; } $part = $self->{-max_git_part} = $max if $max >= 0; |