mirror of
https://github.com/unode/firefox_decrypt.git
synced 2025-12-16 12:01:52 +01:00
🐛 Fix missing fields on deleted passwords
How a deleted record remains in the logins.json file isn't clear but we should now handle the missing information gracefully. Fixes #99
This commit is contained in:
@@ -194,12 +194,17 @@ class JsonCredentials(Credentials):
|
|||||||
raise Exit(Exit.BAD_SECRETS)
|
raise Exit(Exit.BAD_SECRETS)
|
||||||
|
|
||||||
for i in logins:
|
for i in logins:
|
||||||
yield (
|
try:
|
||||||
i["hostname"],
|
yield (
|
||||||
i["encryptedUsername"],
|
i["hostname"],
|
||||||
i["encryptedPassword"],
|
i["encryptedUsername"],
|
||||||
i["encType"],
|
i["encryptedPassword"],
|
||||||
)
|
i["encType"],
|
||||||
|
)
|
||||||
|
except KeyError:
|
||||||
|
# This should handle deleted passwords that still maintain
|
||||||
|
# a record in the JSON file - GitHub issue #99
|
||||||
|
LOG.info(f"Skipped record {i} due to missing fields")
|
||||||
|
|
||||||
|
|
||||||
def find_nss(locations, nssname) -> ct.CDLL:
|
def find_nss(locations, nssname) -> ct.CDLL:
|
||||||
|
|||||||
Reference in New Issue
Block a user