From b5693a2107a1edd02cfad73f9302833e1b91d339 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 4 Jun 2019 08:29:36 +0000 Subject: inbox: require ASCII digits for feedmax var Don't waste more cycles than necessary if somebody decides to put non-ASCII digits in their ~/.public-inbox/config --- lib/PublicInbox/Inbox.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index b3178b98..04d2f832 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; } -- cgit v1.2.3-24-ge0c7