Bug 405135 - The entire clipboard is cleared out rather than just the last password
Summary: The entire clipboard is cleared out rather than just the last password
Status: RESOLVED FIXED
Alias: None
Product: plasma-pass
Classification: Unmaintained
Component: General (other bugs)
Version First Reported In: 1.0.0
Platform: Neon Linux
: NOR major
Target Milestone: ---
Assignee: Daniel Vrátil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-06 09:31 UTC by tomas.teijeiro
Modified: 2023-03-01 22:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 1.2.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tomas.teijeiro 2019-03-06 09:31:23 UTC
SUMMARY

After 45 seconds of reading a password in Plasma Pass, the entire contents of the clipboard vanishes, rather than just the read password.

STEPS TO REPRODUCE
1. Copy several texts in the clipboard.
2. Read one password from plasma-pass.
3. After 45 seconds, the clipboard is completely empty.

OBSERVED RESULT
All the entries in the clipboard are removed.


EXPECTED RESULT
Just the read password should be removed from the clipboard.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon User Edition 5.15 [linux version 4.15.0-46-generic]
(available in About System)
KDE Plasma Version: 5.15.2
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.0

ADDITIONAL INFORMATION
Comment 1 Ritesh Raj Sarraf 2020-03-05 08:08:10 UTC
I have run into almost the same problem.

plasma-pass: 1.1.0
Plasma: 5.17.5
Distribution: Debian Unstable

plasma-pass not only does not copy the password to the clipboard but instead it clears up my entire clipboard.

I see below messages in the logs.

rrs@priyasi:~/rrs-home/Community/plasma-pass (master)$ org.kde.plasma.pass: ServiceJob for clipboard failed internally, falling back to clearClipboard()
Comment 2 medin 2021-05-28 22:38:43 UTC
The same problem on Plasma 5.21.5, this bug lets this great app totally unusable.
Comment 3 Mladen 2022-10-18 19:34:24 UTC
Same started to happen for me as well:

Operating System: Arch Linux
KDE Plasma Version: 5.26.1
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 6.0.2-arch1-1 (64-bit)
Graphics Platform: X11

Relevant entries in journal logs:


plasmashell[26963]: file:///usr/share/plasma/plasmoids/org.kde.plasma.pass/contents/ui/PasswordItemDelegate.qml:63:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }

plasmashell[26963]: org.kde.plasma.pass: ServiceJob for clipboard failed internally, falling back to clearClipboard()
Comment 4 Mladen 2022-10-18 20:17:02 UTC
Just to note, I have created a new user and started from clean profile (home folder) and managed to reproduce the issue.
Comment 5 Daniel Vrátil 2023-03-01 22:05:52 UTC
Git commit 4958d156d682c2a9fe97887244ff7ad4c56b321c by Daniel Vrátil.
Committed on 01/03/2023 at 21:59.
Pushed by dvratil into branch 'master'.

Fix entire clipboard history being always wiped by Plasma Pass

Modern Klipper supports x-kde-passwordManagerHint and won't store
items marked with this hint in the clipboard history. Back when
I was writing Plasma Pass this feature wasn't merged yet. Plasma
Pass was ready for it but it also had to support the current version
of Klipper at that time, so it always go and try to remove the password
from Klipper's history.

When new Klipper with support for x-kde-passwordManagerHint was released
Plasma Pass would still try to remove the password from Klipper's
clipboard history but would always fail (since Klipper doesn't store
passwords in history anymore). This would trigger a safety fallback
inside Plasma Pass that just wipes entire Klipper history, just to
be sure.

With this fix, Plasma Pass will only attempt to remove the password
from Klipper's history if it detects an old Klipper that doesn't support
the hint yet.
FIXED-IN: 1.2.1

M  +2    -0    plugin/CMakeLists.txt
A  +61   -0    plugin/klipperutils.cpp     [License: LGPL(v2.1+)]
A  +20   -0    plugin/klipperutils.h     [License: LGPL(v2.1+)]
M  +27   -2    plugin/providerbase.cpp
M  +4    -0    plugin/providerbase.h

https://invent.kde.org/plasma/plasma-pass/commit/4958d156d682c2a9fe97887244ff7ad4c56b321c