Skip to content
Snippets Groups Projects
Commit 674dbb29 authored by pharook's avatar pharook
Browse files

Doplneni #817 - u target_port, attack_scale, priority, timeout prozatim...

Doplneni #817 - u target_port, attack_scale, priority, timeout prozatim dovolujeme i undef - zpetna kompatibilita
parent e16ea7db
No related branches found
No related tags found
No related merge requests found
...@@ -231,11 +231,11 @@ sub saveNewEvent ...@@ -231,11 +231,11 @@ sub saveNewEvent
} }
my $change_string = ""; my $change_string = "";
if ($target_port !~ /^\d+\z/) { if (defined $target_port && $target_port !~ /^\d+\z/) {
$change_string = $change_string . "target_port: '$target_port'"; $change_string = $change_string . "target_port: '$target_port'";
$target_port = undef; $target_port = undef;
} }
if ($attack_scale !~ /^\d+\z/) { if (defined $attack_scale && $attack_scale !~ /^\d+\z/) {
if ($change_string eq "") { if ($change_string eq "") {
$change_string = $change_string . "attack_scale: '$attack_scale'"; $change_string = $change_string . "attack_scale: '$attack_scale'";
} else { } else {
...@@ -243,7 +243,7 @@ sub saveNewEvent ...@@ -243,7 +243,7 @@ sub saveNewEvent
} }
$attack_scale = undef; $attack_scale = undef;
} }
if ($priority !~ /^\d+\z/) { if (defined $priority && $priority !~ /^\d+\z/) {
if ($change_string eq "") { if ($change_string eq "") {
$change_string = $change_string . "priority: '$priority'"; $change_string = $change_string . "priority: '$priority'";
} else { } else {
...@@ -251,7 +251,7 @@ sub saveNewEvent ...@@ -251,7 +251,7 @@ sub saveNewEvent
} }
$priority = undef; $priority = undef;
} }
if ($timeout !~ /^\d+\z/) { if (defined $timeout && $timeout !~ /^\d+\z/) {
if ($change_string eq "") { if ($change_string eq "") {
$change_string = $change_string . "timeout: '$timeout'"; $change_string = $change_string . "timeout: '$timeout'";
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment