From 2f195cec3b9ccd91862431c8b556ab13623a260f Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 4 Sep 2017 12:56:22 +0900 Subject: [PATCH] BCrypt password hashing wasn't released, no need for migration --- .../java/com/nutomic/syncthingandroid/util/ConfigXml.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java b/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java index 5e70f8fd..65bbd650 100644 --- a/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java +++ b/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java @@ -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)));