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)
|
||||
|
||||
for i in logins:
|
||||
yield (
|
||||
i["hostname"],
|
||||
i["encryptedUsername"],
|
||||
i["encryptedPassword"],
|
||||
i["encType"],
|
||||
)
|
||||
try:
|
||||
yield (
|
||||
i["hostname"],
|
||||
i["encryptedUsername"],
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user