(plugin) apps::pvx::restapi - harden default filter regexp (#3722)
This commit is contained in:
parent
4b71779b05
commit
6f1a41b247
|
@ -167,8 +167,8 @@ sub query_range {
|
|||
|
||||
my $result = $self->get_endpoint(url_path => '/query?expr=' . $uri->encode($query));
|
||||
|
||||
if (defined( $self->{option_results}->{default_value} ) && $options{filter} ne '' && !exists( $result->{data} )) {
|
||||
$options{filter} =~ /([^\s\\]+) = \"([^\s\\]+)\"/;
|
||||
if (defined($self->{option_results}->{default_value}) && $options{filter} ne '' && !exists($result->{data})) {
|
||||
$options{filter} =~ /\s*([^\s\\]+)\s*=\s*\"(.*)\"/;
|
||||
$result->{data} = [
|
||||
{ key => [ { value => $2 } ] },
|
||||
{ values => [ { value => $self->{option_results}->{default_value} } ] }
|
||||
|
|
Loading…
Reference in New Issue