diff options
author | Yorhel <git@yorhel.nl> | 2020-07-10 11:28:29 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-07-10 11:28:29 +0200 |
commit | b97dcb4660ef2cc150cce21079a50c955db98312 (patch) | |
tree | 63ed762e63068d8ba2f92f9dc388680c138a0f75 /lib | |
parent | bdeecf2f5425d44b8c89f447695a9858a04be149 (diff) |
User::List: Fix 500 when searching for a large number
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNWeb/User/List.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNWeb/User/List.pm b/lib/VNWeb/User/List.pm index 04c5d420..5033519a 100644 --- a/lib/VNWeb/User/List.pm +++ b/lib/VNWeb/User/List.pm @@ -69,7 +69,7 @@ TUWF::get qr{/u/(?<char>[0a-z]|all)}, sub { my @where = ( $char eq 'all' ? () : $char eq '0' ? "ascii(username) not between ascii('a') and ascii('z')" : "username like '$char%'", $opt->{q} ? sql_or( - $opt->{q} =~ /^u?([0-9]+)$/ ? sql 'id =', \"$1" : (), + $opt->{q} =~ /^u?([0-9]{1,6})$/ ? sql 'id =', \"$1" : (), sql 'position(', \$opt->{q}, 'in username) > 0' ) : () ); |