In password safe, after opening a keyfile/composite database, if one renames the keyfile, introduces some change and then proceeds to save (a call to save() in pykeepass) the safe could result corrupted in certain scenarios, which would result of a crash when opening it.
Sometimes it would be corrupted and sometimes it wont, making me think that this block
try:
self.db.save()
logging.debug("Saved database")
except Exception:
logging.error("Error occurred while saving database")
does not accomplish its purpose as some part of db.save() happens before checking if the keyfile actually exists.
See https://gitlab.gnome.org/World/PasswordSafe/-/merge_requests/434 and its corresponding issue.
In password safe, after opening a keyfile/composite database, if one renames the keyfile, introduces some change and then proceeds to save (a call to save() in pykeepass) the safe could result corrupted in certain scenarios, which would result of a crash when opening it.
Sometimes it would be corrupted and sometimes it wont, making me think that this block
does not accomplish its purpose as some part of db.save() happens before checking if the keyfile actually exists.
See https://gitlab.gnome.org/World/PasswordSafe/-/merge_requests/434 and its corresponding issue.