Révision 0e1d54f2
fix tor-bandwidth-usage
I mistakenly broke the authentication routine during my overhaul of
the plugin.
| plugins/network/tor-bandwidth-usage | ||
|---|---|---|
| 60 | 60 |
if (open(COOKIE, "<$ENV{cookiefile}")) {
|
| 61 | 61 |
my $cookie; |
| 62 | 62 |
binmode COOKIE; |
| 63 |
read(COOKIE, $cookie, 32); |
|
| 63 |
$authline .= " "; |
|
| 64 |
while (read(COOKIE, $cookie, 32)) {
|
|
| 65 |
foreach my $byte (unpack "C*", $cookie) {
|
|
| 66 |
$authline .= sprintf "%02x", $byte; |
|
| 67 |
} |
|
| 68 |
} |
|
| 64 | 69 |
close COOKIE; |
| 65 |
$authline .= ' "' . $cookie . '"'; |
|
| 66 | 70 |
} |
| 67 | 71 |
} elsif (defined($ENV{password})) {
|
| 68 | 72 |
$authline .= ' "' . $ENV{password} . '"';
|
Formats disponibles : Unified diff