Skip to content

Commit 5d310b1

Browse files
committed
Fix command injection vulnerability
1 parent 64f714b commit 5d310b1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

check_smart.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@
158158
}
159159

160160
foreach my $opt_dl (@dev){
161-
warn "Found $opt_dl\n" if $opt_debug;
161+
warn "(debug) Found $opt_dl\n" if $opt_debug;
162162
if (-l $opt_dl) {
163-
warn "$opt_dl is a symlink, skipping for security reasons\n\n" if $opt_debug;
163+
warn "(debug) $opt_dl is a symlink, skipping for security reasons\n" if $opt_debug;
164164
} elsif (-b $opt_dl || -c $opt_dl || $opt_dl =~ m/^\/dev\/bus\/\d$/) {
165165
$device .= $opt_dl."|";
166166
} else {
167-
warn "$opt_dl is not a valid block/character special device!\n\n" if $opt_debug;
167+
warn "(debug) $opt_dl is not a valid block/character special device!\n\n" if $opt_debug;
168168
}
169169
}
170170

0 commit comments

Comments
 (0)