version 0.4.5
authorlouisabraham <louis.abraham@yahoo.fr>
Tue, 2 Apr 2019 22:58:45 +0000 (00:58 +0200)
committerlouisabraham <louis.abraham@yahoo.fr>
Tue, 2 Apr 2019 22:58:45 +0000 (00:58 +0200)
add a message when the database is broken
follows the discussion in #6

ffpass/__init__.py
setup.py

index f1db1c2e6e4f244f6a2f812c251b4a5209ae1976..ddba1c0c8839bec99094cf9710e9dda88593e6c8 100644 (file)
@@ -86,7 +86,9 @@ def getKey(directory: Path, masterPassword=""):
         if row[1] == MAGIC1:
             break
     a11 = row[0]  # CKA_VALUE
-    assert row[1] == MAGIC1  # CKA_ID
+    assert (
+        row[1] == MAGIC1
+    ), "The Firefox database appears to be broken. Try to add a password to rebuild it."  # CKA_ID
     decodedA11, _ = der_decode(a11)
     entrySalt = decodedA11[0][1][0].asOctets()
     cipherT = decodedA11[1].asOctets()
index f5fcbb8303b34972379efc93f42effc7bfc25d53..6893fa777087381196c7fa957f2b294108709c8a 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ def read(fname):
 
 setup(
     name="ffpass",
-    version="0.4.4",
+    version="0.4.5",
     author="Louis Abraham",
     license="MIT",
     author_email="louis.abraham@yahoo.fr",