From cc41fd3740913c3198514ee8d51abaf79b498969 Mon Sep 17 00:00:00 2001 From: Florian Asche Date: Thu, 8 May 2014 15:29:59 +0200 Subject: [PATCH] Ref #5529 Bugfix: Added uri_unescape --- centreon-plugins/apps/tomcat/web/mode/requestinfo.pm | 2 ++ centreon-plugins/apps/tomcat/web/mode/threads.pm | 2 ++ centreon-plugins/apps/tomcat/web/mode/traffic.pm | 2 ++ 3 files changed, 6 insertions(+) diff --git a/centreon-plugins/apps/tomcat/web/mode/requestinfo.pm b/centreon-plugins/apps/tomcat/web/mode/requestinfo.pm index 4412a7139..ab0a9f815 100644 --- a/centreon-plugins/apps/tomcat/web/mode/requestinfo.pm +++ b/centreon-plugins/apps/tomcat/web/mode/requestinfo.pm @@ -42,6 +42,7 @@ use centreon::plugins::httplib; use centreon::plugins::statefile; use Digest::MD5 qw(md5_hex); use XML::XPath; +use URI::Escape; sub new { my ($class, %options) = @_; @@ -203,6 +204,7 @@ sub manage_selection { my $connector_name = $node->getParentNode()->getParentNode()->getAttribute("name"); $connector_name =~ s/^["'\s]+//; $connector_name =~ s/["'\s]+$//; + $connector_name = uri_unescape($connector_name); next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi}) && $connector_name !~ /$self->{option_results}->{name}/i); diff --git a/centreon-plugins/apps/tomcat/web/mode/threads.pm b/centreon-plugins/apps/tomcat/web/mode/threads.pm index 89fbcaea0..6e386ba0b 100644 --- a/centreon-plugins/apps/tomcat/web/mode/threads.pm +++ b/centreon-plugins/apps/tomcat/web/mode/threads.pm @@ -40,6 +40,7 @@ use strict; use warnings; use centreon::plugins::httplib; use XML::XPath; +use URI::Escape; sub new { my ($class, %options) = @_; @@ -160,6 +161,7 @@ sub manage_selection { my $connector_name = $node->getParentNode()->getParentNode()->getAttribute("name"); $connector_name =~ s/^["'\s]+//; $connector_name =~ s/["'\s]+$//; + $connector_name = uri_unescape($connector_name); next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi}) && $connector_name !~ /$self->{option_results}->{name}/i); diff --git a/centreon-plugins/apps/tomcat/web/mode/traffic.pm b/centreon-plugins/apps/tomcat/web/mode/traffic.pm index f212c2572..a8f02933e 100644 --- a/centreon-plugins/apps/tomcat/web/mode/traffic.pm +++ b/centreon-plugins/apps/tomcat/web/mode/traffic.pm @@ -43,6 +43,7 @@ use centreon::plugins::misc; use centreon::plugins::statefile; use Digest::MD5 qw(md5_hex); use XML::XPath; +use URI::Escape; sub new { my ($class, %options) = @_; @@ -188,6 +189,7 @@ sub manage_selection { my $connector_name = $node->getParentNode()->getParentNode()->getAttribute("name"); $connector_name =~ s/^["'\s]+//; $connector_name =~ s/["'\s]+$//; + $connector_name = uri_unescape($connector_name); next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi}) && $connector_name !~ /$self->{option_results}->{name}/i);