Have you searched for an existing issue?
Brief Summary
I may be missing something; my apologies if that's the case.
When using the GUI, the MIME type x-kde-passwordManagerHint (not technically "MIME"), see #12696) is adequately set upon copying passwords.
However, in trying out xkeepassxc-cli clip, it appears to be missing.
I can see it's indeed implemented somewhere here:
|
auto* mime = new QMimeData; |
|
mime->setText(text); |
|
#if defined(Q_OS_MACOS) |
|
mime->setData("application/x-nspasteboard-concealed-type", text.toUtf8()); |
|
#elif defined(Q_OS_UNIX) |
|
mime->setData("x-kde-passwordManagerHint", QByteArrayLiteral("secret")); |
|
#elif defined(Q_OS_WIN) |
|
mime->setData("ExcludeClipboardContentFromMonitorProcessing", QByteArrayLiteral("1")); |
|
mime->setData("CanIncludeInClipboardHistory", {4, '\0'}); |
|
mime->setData("CanUploadToCloudClipboard ", {4, '\0'}); |
|
#endif |
But that seems to belong squarely to the GUI side of things only.
Could we align the CLI tool as well?
Steps to Reproduce
- Open the GUI,
Ctrl-C some entry,
- see its password marked as such in any tool you may use to inspect your clipboard.
For example, fcitx5's built-in clipboard add-on would highlight passwords as such (and possibly hide them), as implemented somewhere there: https://github.com/fcitx/fcitx5/blob/39274f29116681a16c3a0b02b814369c6530df09/src/modules/clipboard/clipboard.h#L45
Conversely,
keepassxc-cli clip personal.kdbx --attr password
- See, for instance,
fcitx5 have no qualms about displaying your passwords.
Operating System
Distribution: linux-zen/Arch Linux
Compositor: Wayland/niri
Have you searched for an existing issue?
Brief Summary
I may be missing something; my apologies if that's the case.
When using the GUI, the MIME type
x-kde-passwordManagerHint(not technically "MIME"), see #12696) is adequately set upon copying passwords.However, in trying out
xkeepassxc-cli clip, it appears to be missing.I can see it's indeed implemented somewhere here:
keepassxc/src/gui/Clipboard.cpp
Lines 55 to 65 in f484d7f
But that seems to belong squarely to the GUI side of things only.
Could we align the CLI tool as well?
Steps to Reproduce
Ctrl-Csome entry,For example,
fcitx5's built-inclipboardadd-on would highlight passwords as such (and possibly hide them), as implemented somewhere there: https://github.com/fcitx/fcitx5/blob/39274f29116681a16c3a0b02b814369c6530df09/src/modules/clipboard/clipboard.h#L45Conversely,
keepassxc-cli clip personal.kdbx --attr passwordfcitx5have no qualms about displaying your passwords.Operating System
Distribution:
linux-zen/Arch LinuxCompositor:
Wayland/niri