From 675c1a5f7b09689f38eec4620afe95a36321e1b8 Mon Sep 17 00:00:00 2001 From: qgarnier Date: Tue, 15 Feb 2022 17:20:10 +0100 Subject: [PATCH] (plugin) apps::protocl::http - mode json-content and collection can use JSONPath embedded perl expressions (#3489) --- apps/protocols/http/mode/collection.pm | 1 + apps/protocols/http/mode/jsoncontent.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/protocols/http/mode/collection.pm b/apps/protocols/http/mode/collection.pm index 2c2480a5b..5914d1cab 100644 --- a/apps/protocols/http/mode/collection.pm +++ b/apps/protocols/http/mode/collection.pm @@ -32,6 +32,7 @@ use Time::HiRes qw(gettimeofday tv_interval); use JSON::XS; use XML::LibXML::Simple; use JSON::Path; +$JSON::Path::Safe = 0; sub custom_select_threshold { my ($self, %options) = @_; diff --git a/apps/protocols/http/mode/jsoncontent.pm b/apps/protocols/http/mode/jsoncontent.pm index bd0d117e1..564cc609e 100644 --- a/apps/protocols/http/mode/jsoncontent.pm +++ b/apps/protocols/http/mode/jsoncontent.pm @@ -29,6 +29,7 @@ use centreon::plugins::http; use centreon::plugins::misc; use JSON::Path; use JSON; +$JSON::Path::Safe = 0; sub new { my ($class, %options) = @_;