palant / pfp

A simple and secure browser extension to be used with KeePass databases.
https://pfp.works/
Mozilla Public License 2.0
114 stars 14 forks source link

Firefox storage question #35

Closed r-a-y closed 8 years ago

r-a-y commented 8 years ago

Hi @palant,

In the Firefox extension, occasionally, my EP configuration is wiped out and I'll have to re-add my master password and re-import my EP configuration.

So I'm wondering how EP is storing its data and how I can prevent my configuration from being wiped out in Firefox?

palant commented 8 years ago

Easy Passwords is using simple-storage on Firefox. I've never had issues with the configuration being wiped, and the way simple-storage is implemented I don't really see why it would be. For reference, the data is stored in the file jetpack/easypasswords@palant.de/simple-storage/store.json in your Firefox profile. Maybe there is some application removing this file (e.g. "disk cleaner")?

mnoorenberghe commented 8 years ago

There are known issues with simple-storage losing data in some edge cases. The two bugs I can find off hand are https://bugzilla.mozilla.org/show_bug.cgi?id=1091244 and https://bugzilla.mozilla.org/show_bug.cgi?id=1191954 but I believe I've seen an older report too.

palant commented 8 years ago

None of these issues apply here, they wouldn't result in complete data loss - merely loss of recent changes (last 5 minutes). This is expected because simple-storage doesn't write data immediately but only every 5 minutes and on shutdown. So if Firefox crashes for example then most recent changes might get lost (not very likely with Easy Passwords as data doesn't change frequently).

palant commented 8 years ago

It seems that Mozilla is recommending indexedDB rather than simple-storage so I switched to that now. It should hopefully be more reliable, the disadvantage is that looking at the stored data is no longer trivial. Technically, data is stored in storage/permanent/indexeddb+++easypasswords-at-palant-dot-de directory in the Firefox profile but making sense of it is non-trivial even with the sqlite command line tool.

r-a-y commented 8 years ago

Just wanted to say that I ran into this issue again, but I think the move to indexedDB will resolve this.

palant commented 8 years ago

This change isn't part of any release yet.

r-a-y commented 8 years ago

Yeah, I know :)

palant commented 8 years ago

Easy Passwords 1.1.3 is out, I expect Mozilla to review it today.