1Password / arboard

A clipboard for Rust
Apache License 2.0
616 stars 65 forks source link

`exclude_from_history` not implemented for KDE klipper clipboard history #129

Open PyroDevil opened 6 months ago

PyroDevil commented 6 months ago

I am using the bitwarden desktop app on Linux/KDE, which uses arboard to manage the clipboard and noticed that passwords are stored in the KDE Klipper clipboard manager history.

This can be circumvented by adding x-kde-passwordManagerHint MIME data hint to the clipboard entry and setting it to secret, see:

https://bugs.kde.org/show_bug.cgi?id=458063

This is implemented in keepassxreboot in this PR:

https://github.com/keepassxreboot/keepassxc/pull/1969/commits


BTW the current source code of keepassxreboot also contains an implementation that prevents macosx to put secrets into the clipboard manager: https://github.com/keepassxreboot/keepassxc/blob/7bfe9065cf3a7b9e32094d965eb13a8c7fc0cc82/src/gui/Clipboard.cpp#L56 So maybe this should be part of the generic interface.

complexspaces commented 6 months ago

Thanks for opening this issue, this is also something 1Password has been tracking internally as well for our Linux desktop app (which is using arboard). Just to make sure its clear though, exclude_from_history isn't implemented at all for non-Windows OSes right now.

I'm not sure when I can prioritize this, but I would definitely accept a PR that implements Set::exclude_from_history for Linux using the KDE MIME hint as it appears to be the defacto-standard in the Linux world for this a official specification from FreeDesktop or similar is absent.

BTW the current source code of keepassxreboot also contains an implementation that prevents macosx to put secrets into the clipboard manager... So maybe this should be part of the generic interface.

While I'm not completely against the idea of making this a generic interface, I still think there's reason to keep it as an extension trait method (even if it exists everywhere). The two platforms that have yet to be supported (recent) Android and iOS also support the functionality but its not a promise any new platforms to support will have the equivalent. Linux and macOS just barely count IMO since they have long-standing, community-run and respected specifications.