Skip to content

Commit

Permalink
Fix for #1883
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Vicente committed Dec 14, 2015
1 parent a6cda3c commit 30681d7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/find_address.pl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

print "--------------------\n";

if ( $address =~ /$MAC/ ){
if ( $address =~ /^$MAC$/ ){
$address = PhysAddr->format_address($address);
if ( $self{FORCE_LIVE} ){
&search_live(mac=>$address, vlan=>$self{VLAN});
Expand Down
2 changes: 1 addition & 1 deletion htdocs/management/device_tasks.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
if ( $submit eq 'Find' ){
# Get rid of spaces
$device_search =~ s/\s+//g;
if ( $device_search =~ /$MAC/ ){
if ( $device_search =~ /^$MAC$/ ){
$m->comp('.show_tasks', %ARGS, user=>$user);
$m->comp('/management/mac.html', search=>$device_search, dowindow=>1 );
}elsif ( Ipblock->matches_ip($device_search) ){
Expand Down
2 changes: 1 addition & 1 deletion htdocs/management/host_tasks.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
# Remove trailing and leading spaces
$search = $ui->rem_lt_sp($search);
$search ||= '*';
if ( $search =~ /$MAC/ ){
if ( $search =~ /^$MAC$/ ){
@list = PhysAddr->search(address=>$search);
}elsif ( Ipblock->matches_ip($search) ){
@list = Ipblock->search(address=>$search);
Expand Down
2 changes: 0 additions & 2 deletions htdocs/user_management/hostinfo_tasks.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
*print_showtaskslink = $m->comp('SELF:.sub_print_showtaskslink');
my $hideheader = 'style="display:none"' if ( !$showheader );

my $MAC = Netdot->get_mac_regex();

</%init>

<div id="sectiontools" <% $hideheader %>>
Expand Down

0 comments on commit 30681d7

Please sign in to comment.