mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 22:31:16 +00:00
BCrypt password hashing wasn't released, no need for migration
This commit is contained in:
parent
679841a6ac
commit
2f195cec3b
1 changed files with 1 additions and 7 deletions
|
@ -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)));
|
||||
|
|
Loading…
Reference in a new issue