Skip to content

Add "Remember me" button - #124

Merged
robinmoisson merged 10 commits into
gh-pagesfrom
remember-me
Feb 10, 2022
Merged

robinmoisson merged 10 commits into
gh-pagesfrom
remember-me

Conversation

@robinmoisson

@robinmoisson robinmoisson commented Feb 9, 2022 •

Copy link
Copy Markdown
Owner

Inspired by the discussion of #120 and #122 - this adds the option to put a "Remember me" checkbox on the decrypt screen.

When checked, when a user decrypts the page the passphrase will be saved in localStorage in plain text in the staticrypt_passphrase field and will automatically decrypt the page when they come back.

If a non-zero expiration has been set when encrypting the page, another field staticrypt_expiration is created and saved in localStorage when the passphrase is successfully entered. If the user comes back to the page after this expiration date, both values are cleared from localStorage and the user has to enter their passphrase again.

It's also possible to clear the saved passphrase at anytime by appending staticrypt_logout to the URL query parameters.


The PR also adds more parameters to make all strings from the default password template editable (to help make i18n more accessible).

Screenshot from 2022-02-09 11-42-59

Closes #120, closes #114, closes #122

@epicfaace epicfaace left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for adding this!!

Comment thread README.md Resolved
@epicfaace

epicfaace commented Feb 9, 2022 •

Copy link
Copy Markdown
Contributor

Also -- your suggestion -- "A mitigation I had in mind was salting + hashing the passphrase and store that in localStorage, so the hashed passphrase effectively becomes the key to the encrypted page. This doesn't mitigate the leaking of the hashed passphrase, which allows decryption of the page, but does mitigate password reuse." -- I think it's worth it to run something like pbdkf2 on the password, just to mitigate this risk of password reuse! Might be better to add now in this PR rather than later and expose people to more risk

@epicfaace epicfaace left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

@epicfaace epicfaace left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Comment thread README.md Resolved
@robinmoisson

Copy link
Copy Markdown
Owner Author

@epicfaace yes I agree it would be better to not release a version that store cleartext password even temporarily, so I did the change in this PR and it's now the salted + hashed passphrase that we store in localStorage.

Thanks for your review & feedback!

Comment thread cli/index.js Resolved
@robinmoisson
robinmoisson merged commit 26563f5 into gh-pages Feb 10, 2022
@robinmoisson robinmoisson linked an issue Feb 10, 2022 that may be closed by this pull request
@robinmoisson
robinmoisson deleted the remember-me branch February 10, 2022 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extension for encrypting an entire website Allow caching of password Encrypting Multiple Pages

2 participants