Password Conversion for YaBB 2
1.2
Converts passwords used by the old password security mod to the YaBB 2 encryption when a user logs in with the old password.
To install:
Use BoardMod like normal
Upload Admin/ModList.pl and Sources/LoginOut.pl
Version History:
1.2 - Made compatible with YaBB 2 Final
1.1 - ModList entry added
1.0 - First version released on BoardMod forums
AK108
http://fkp.jkcsi.com/
Sources/LogInOut.pl
# convert non encrypted password to MD5 crypted one
if ($spass eq $FORM{'passwrd'} && $spass ne $cryptpass) {
# only encrypt the password if it's not already MD5 encrypted
# MD5 hashes in YaBB are always 22 chars long (base64)
if (length(${$uid.$username}{'password'}) != 22) {
${$uid.$username}{'password'} = $cryptpass;
&UserAccount($username, "update");
$spass = $cryptpass;
}
}
### Password Conversion for YaBB 2 Mod
if(($spass eq crypt($FORM{'passwrd'}, "yy")) && $spass ne $cryptpass) {
${$uid.$username}{'password'} = $cryptpass;
&UserAccount($username,"update");
$spass = $cryptpass;
}
### End Password Conversion Mod
Admin/ModList.pl
### END BOARDMOD ANCHOR ###
$password_conversion_mod = 'Password_Conversion_Mod|AK108|This mod converts passwords encrypted using the YaBB 1 Password Security Mod to the YaBB 2 format when the user logs in.|1.2|October 2, 2005';
push (@installed_mods, $password_conversion_mod);