ttyridal / masterpassword-firefox

masterpassword for Firefox
GNU General Public License v3.0
33 stars 9 forks source link

Add 'x-kde-passwordManagerHint' mimetype so that a copied password doesn't get saved to long-term history #85

Open Pointedstick opened 2 years ago

Pointedstick commented 2 years ago

KDE's clipboard manager has a persistent history feature, but allows for the possibility of adding an item to the clipboard so that it can be immediately pasted, but it doesn't get added to the history at all. To do this, the x-kde-passwordManagerHint mimetype needs to be added to the list of mimetypes for the paste data. This would be a nice thing to do here, so that when you copy a password to paste it into a text field that was not able to be automatically populated, there is no risk of a password being leaked into the user's plaintext history.

See https://phabricator.kde.org/D12539 for more information.

ttyridal commented 2 years ago

Interesting feature. While kde specific I think it would be worthwhile to support

Pointedstick commented 2 years ago

Cool. I can try my hand at implementing it if you can point me to where in the code the MIME data gets set.

ttyridal commented 2 years ago

Great. The clip board is handled here:

https://github.com/ttyridal/masterpassword-firefox/blob/master/ext/webextension/src/lib/utils.js