Skip to content

Commit

Permalink
Catch an error in translating ctl actions
Browse files Browse the repository at this point in the history
  • Loading branch information
p0pr0ck5 committed Feb 6, 2017
1 parent 6205c38 commit 742e897
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/Modsec2LRW.pm
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,11 @@ sub translate_actions {
} elsif ($key eq 'ctl') {
my ($opt, $data) = split /=/, $value;

$ctl_lookup->{$opt}($data, $translation);
if (defined $ctl_lookup->{$opt}) {
$ctl_lookup->{$opt}($data, $translation);
} else {
warn "Cannot translate ctl option $opt";
}
} elsif ($key eq 'expirevar') {
my ($var, $time) = split /=/, $value;
my ($collection, $element) = split /\./, $var;
Expand Down

0 comments on commit 742e897

Please sign in to comment.