#388 searching for 0.x.x.x returns Internal Server Error (C. Neuhaus)
This commit is contained in:
@@ -23,6 +23,7 @@ ajax '/ajax/content/search/node' => require_login sub {
|
|||||||
my ( $start, $end ) = param('daterange') =~ m/(\d+-\d+-\d+)/gmx;
|
my ( $start, $end ) = param('daterange') =~ m/(\d+-\d+-\d+)/gmx;
|
||||||
|
|
||||||
my $mac = NetAddr::MAC->new(mac => $node);
|
my $mac = NetAddr::MAC->new(mac => $node);
|
||||||
|
undef $mac if ($mac and $mac->as_ieee and ($mac->as_ieee eq '00:00:00:00'));
|
||||||
my @active = (param('archived') ? () : (-bool => 'active'));
|
my @active = (param('archived') ? () : (-bool => 'active'));
|
||||||
|
|
||||||
my (@times, @wifitimes, @porttimes);
|
my (@times, @wifitimes, @porttimes);
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ get '/search' => require_login sub {
|
|||||||
my $nd = $s->resultset('Device')->search_fuzzy($q);
|
my $nd = $s->resultset('Device')->search_fuzzy($q);
|
||||||
my ($likeval, $likeclause) = sql_match($q);
|
my ($likeval, $likeclause) = sql_match($q);
|
||||||
my $mac = NetAddr::MAC->new($q);
|
my $mac = NetAddr::MAC->new($q);
|
||||||
|
undef $mac if ($mac and $mac->as_ieee and ($mac->as_ieee eq '00:00:00:00'));
|
||||||
|
|
||||||
if ($nd and $nd->count) {
|
if ($nd and $nd->count) {
|
||||||
if ($nd->count == 1) {
|
if ($nd->count == 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user