mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00: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
1 changed files with 6 additions and 2 deletions
|
@ -60,9 +60,13 @@ sub Authenticate
|
||||||
if (open(COOKIE, "<$ENV{cookiefile}")) {
|
if (open(COOKIE, "<$ENV{cookiefile}")) {
|
||||||
my $cookie;
|
my $cookie;
|
||||||
binmode 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;
|
close COOKIE;
|
||||||
$authline .= ' "' . $cookie . '"';
|
|
||||||
}
|
}
|
||||||
} elsif (defined($ENV{password})) {
|
} elsif (defined($ENV{password})) {
|
||||||
$authline .= ' "' . $ENV{password} . '"';
|
$authline .= ' "' . $ENV{password} . '"';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue