out an error if name contains invalid characters
This commit is contained in:
parent
57141fddeb
commit
3ac6dc267b
|
@ -352,9 +352,13 @@ sub exportsql {
|
||||||
}
|
}
|
||||||
|
|
||||||
my $name = $ARGV[0];
|
my $name = $ARGV[0];
|
||||||
if ($name && $name =~ /^([A-Za-z0-9 ,.&()\/\-]+)$/) { # Allow alphanumeric and " ,.&()/-"
|
if ( $name ) {
|
||||||
|
if ( $name =~ /^([A-Za-z0-9 ,.&()\/\-]+)$/ ) { # Allow alphanumeric and " ,.&()/-"
|
||||||
$name = $1;
|
$name = $1;
|
||||||
$command .= qq( --where="Name = '$name'");
|
$command .= qq( --where="Name = '$name'");
|
||||||
|
} else {
|
||||||
|
print "Invalid characters in Name\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$command .= " zm Controls MonitorPresets";
|
$command .= " zm Controls MonitorPresets";
|
||||||
|
|
Loading…
Reference in New Issue