BCrypt password hashing wasn't released, no need for migration

This commit is contained in:
Felix Ableitner 2017-09-04 12:56:22 +09:00
parent 679841a6ac
commit 2f195cec3b
1 changed files with 1 additions and 7 deletions

View File

@ -157,14 +157,8 @@ public class ConfigXml {
}
String apikey = getApiKey();
boolean passwordOk;
// Version 0.9.12 used the default work factor of 10. If this is set, regenerate the
// password with the minimum factor of 4, to speed up loading.
String pw = password.getTextContent();
if (TextUtils.isEmpty(pw) || pw.substring(4, 6).equals("10")) {
passwordOk = false;
} else {
passwordOk = BCrypt.checkpw(apikey, pw);
}
passwordOk = !TextUtils.isEmpty(pw) && BCrypt.checkpw(apikey, pw);
if (!passwordOk) {
Log.i(TAG, "Updating password");
password.setTextContent(BCrypt.hashpw(apikey, BCrypt.gensalt(4)));