From: ivan Date: Wed, 8 Jun 2011 22:58:18 +0000 (+0000) Subject: pad LDAP base64-encoded md5 and sha1 passwords to 4 byte boundries with =, RT#13192 X-Git-Tag: freeside_2_3_0~160 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=171b9af511fb12d03760e6643542b68ae4babb41;p=freeside.git pad LDAP base64-encoded md5 and sha1 passwords to 4 byte boundries with =, RT#13192 --- diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index c3e72092c..a901f3bbb 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -1590,6 +1590,8 @@ sub set_password { $pass = crypt($pass, $saltset[int(rand(64))].$saltset[int(rand(64))]); } # else $encryption eq 'plain', do nothing + $pass .= '=' x (4 - length($pass) % 4) #properly padded base64 + if $encryption eq 'md5' || $encryption eq 'sha1'; $pass = '{'.uc($encryption).'}'.$pass; } # else encoding eq 'plain'