Subject: | Typos in set_password function results in Unknown RADIUS tuple User-Password |
There is a Typo in Packet.pm that prevents set_password from working...it seems no one uses this function , its a 4 years old
critical bug....
Patch is attached
regards
Subject: | set_password.patch |
--- Packet.pm.orig 2009-09-11 23:30:08.000000000 +0200
+++ Packet.pm 2013-02-24 22:11:47.833981356 +0100
@@ -232,8 +232,8 @@
$pwdin .= "\000" x (15-(15 + length $pwdin)%16); # pad to 16n bytes
for (my $i = 0; $i < length($pwdin); $i += 16) {
- $lastround = substr($pwdin, $i, 16)
- ^ Digest::MD5::md5($secret . $lastround);
+ $lastround = substr($pwdin, $i, 16);
+ Digest::MD5::md5($secret . $lastround);
$pwdout .= $lastround;
}
$self->set_attr($attribute => $pwdout, 1);