X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fsvc_acct.pm;h=de9199da40f2fe113012a923cdbdcd0aed7099f9;hp=b659b01b277e66bc6a4f10eb8ca48df68ebff5dd;hb=197f613bac6c3f9a4bd7d1ea5fbf4769aea4ce1a;hpb=1878ee1e6238755464472ea20e944fdab8fb5f0b diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index b659b01b2..de9199da4 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -1323,8 +1323,7 @@ sub check { $recref->{_password} = $1; } else { return gettext('illegal_password'). " $passwordmin-$passwordmax ". - FS::Msgcat::_gettext('illegal_password_characters'). - ": ". $recref->{_password}; + FS::Msgcat::_gettext('illegal_password_characters'); } if ( $password_noampersand ) { @@ -2543,6 +2542,11 @@ sub crypt_password { ); } elsif ( $encryption eq 'md5' ) { return unix_md5_crypt( $self->_password ); + } elsif ( $encryption eq 'sha512' ) { + return crypt( + $self->_password, + '$6$rounds=15420$'. join('', map $saltset[int(rand(64))], (1..16) ) + ); } elsif ( $encryption eq 'sha1_base64' ) { #for acct_sql my $pass = sha1_base64( $self->_password ); $pass .= '=' x (4 - length($pass) % 4); #properly padded base64