#738 crash on wildcard search

This commit is contained in:
Oliver Gorwits
2020-09-23 09:38:46 +01:00
parent a146f53d67
commit ef1e2616f1
2 changed files with 2 additions and 0 deletions

View File

@@ -63,6 +63,7 @@ register_search_tab({
get '/ajax/content/search/node' => require_login sub {
my $node = param('q');
send_error('Missing node', 400) unless $node;
return unless ($node =~ m/\w/); # need some alphanum at least
content_type('text/html');
my $agenot = param('age_invert') || '0';

View File

@@ -23,6 +23,7 @@ register_search_tab({
get '/ajax/content/search/vlan' => require_login sub {
my $q = param('q');
send_error( 'Missing query', 400 ) unless $q;
return unless ($q =~ m/\w/); # need some alphanum at least
my $rs;
if ( $q =~ m/^\d+$/ ) {