The clipboard is not cleared according to the relevant security setting.
Nothing should be pasted.
The password is pasted!
The mouse clipboard is cleared.
I'm running vanilla Ubuntu 19.10 (with GNOME) with the latest updates. I'm not running any custom clipboard managers as far as I know.
This did work on every other KeePassXC version + OS + WM combination I've ever tried before.
KeePassXC - Version 2.4.3
Revision: 5d6ef0c
Qt 5.12.4
Debugging mode is disabled.
Operating system: Ubuntu 19.10
CPU architecture: x86_64
Kernel: linux 5.3.0-24-generic
Enabled extensions:
Cryptographic libraries:
libgcrypt 1.8.4
Holy cow confirmed. This affects Linux only.
I bet you are using a clipboard manager. In Klipper you have to turn off "Prevent empty clipboard".
I cannot reproduce this with that setting turned off.
@phoerious I'm not using Klipper, at least. And none of these show any results:
apt list --installed | grep --ignore-case clipboardpgrep --ignore-case clipboardapropos clipboard only shows xclipboard, which AFAIK is not a clipboard manager.
Do you know any other ways to check whether I am using a clipboard manager?
We discussed this on IRC, it may be that Gnome has some built-in clipboard management features or there is a weird Qt interaction preventing us from clearing the clipboard. On KDE I cannot reproduce this behaviour.
Can you test if
xclip -selection clipboard <(echo -n) && xsel -c
reliably clears both (!) the Ctrl+V and the middle-mouse-button clipboard buffers?
@phoerious Verified:
Hello, I am encoutering the same issue on Debian unstable but kernel 4.19.0-5-amd64. This issue has been present since I switched from KeepassX to KeepassXC about 1 or 2 months ago. I had not this issue from using KeePassx. Funny thing is, I tried , the keepassxc-cli clip and the timeout successfully cleared the clipboard. I am using gnome 1:3.30+2. I am using the packaged keepassxc version (2.4.3).
EDIT: I do not have a clipboard manager. A colleague also using gnome on debian unstable is having the same problem. Other colleagues on other window-manager on debian unstable do not encounter the same issue.
The CLI uses xclip for managing the clipboard.
Instead of clearing the clipboard, wouldn't it be more reliable to change it to some whitespace?
That may be the issue, Gtk could be ignoring a blank clipboard entry and retaining the existing clipboard.
To add some context: GS/Mutter 3.34 (the version shipped with Ubuntu 19.10) introduced a clipboard manager by default. Whenever the clipboard is cleared, the c-m takes over and provides a copy previously taken for further use. So what we see here is likely a conflict of features (as rightly pointed out before).
The solution taken here, explicitly setting a new empty content, therefore appears to be the safest solution, also taken other clipboard managers into account.
FTR, actually Carlos found a way to allow clearing the clipboard without the c-m taking over - backported to gnome 3.34 / 3.36 (https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1206?commit_id=5671f0a284a5875f7d964a4d368470c33581ba80)