summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2008-06-30 22:55:50 +0200
committerTobi Oetiker <tobi@oetiker.ch>2008-06-30 22:55:50 +0200
commit11299344ee659123b8fe18794da4e7a7b24c6e5c (patch)
tree0cc23c2e8afdeb25711b4a7c5786563eb1dcf397 /lib
parentfae328cd534c1f700cdf8576cd370f68d62d585a (diff)
downloadsmokeping-11299344ee659123b8fe18794da4e7a7b24c6e5c.tar.gz
smokeping-11299344ee659123b8fe18794da4e7a7b24c6e5c.tar.xz
improved documentation for master/slave
fixed taint error in Smokeping.pm
Diffstat (limited to 'lib')
-rw-r--r--lib/Smokeping.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index e66ee44..cb8ec46 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -1000,7 +1000,7 @@ sub get_detail ($$$$;$){
my $tree = shift;
my $open = shift;
my $mode = shift || $q->param('displaymode') || 's';
-
+
my $phys_tree = $tree;
my $phys_open = $open;
if ($tree->{__tree_link}){
@@ -1547,7 +1547,11 @@ sub hierarchy_switcher($$){
sub display_webpage($$){
my $cfg = shift;
my $q = shift;
- my ($path,$slave) = split(/~/,$q->param('target') || '');
+ my $trag = '';
+ if ( $q->param('target') and $q->param('target') !~ /\.\./ and $q->param('target') =~ /(\S+)/){
+ $targ = $1;
+ }
+ my ($path,$slave) = split(/~/,$targ);
if ($slave and $slave ~= /(\S+)/){
die "ERROR: slave '$slave' is not defined in the '*** Slaves ***' section!\n"
unless defined $cfg->{Slaves}{$slave};