mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
fix tor-bandwidth-usage
I mistakenly broke the authentication routine during my overhaul of the plugin.
This commit is contained in:
parent
d8ef1a40a1
commit
0e1d54f2fd
@ -60,9 +60,13 @@ sub Authenticate
|
||||
if (open(COOKIE, "<$ENV{cookiefile}")) {
|
||||
my $cookie;
|
||||
binmode COOKIE;
|
||||
read(COOKIE, $cookie, 32);
|
||||
$authline .= " ";
|
||||
while (read(COOKIE, $cookie, 32)) {
|
||||
foreach my $byte (unpack "C*", $cookie) {
|
||||
$authline .= sprintf "%02x", $byte;
|
||||
}
|
||||
}
|
||||
close COOKIE;
|
||||
$authline .= ' "' . $cookie . '"';
|
||||
}
|
||||
} elsif (defined($ENV{password})) {
|
||||
$authline .= ' "' . $ENV{password} . '"';
|
||||
|
Loading…
Reference in New Issue
Block a user