Redact copied passwords after 30 seconds
Needs ReviewPublic

Authored by michaelmccallum on Oct 3 2018, 12:05 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

When you copy a password from the store and use it, its good practice to clear the clipboard afterwards.

This patch automates this process by setting a timer on copy to clean up.

Test Plan

Open a wallet, copy a password and past it for 31 seconds till it shows *redacted*

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
Restricted Application added a subscriber: kde-utils-devel. ยท View Herald TranscriptOct 3 2018, 12:05 PM
michaelmccallum requested review of this revision.Oct 3 2018, 12:05 PM
cfeck added a subscriber: cfeck.Oct 3 2018, 12:22 PM

Doesn't Klipper remember it anyway?

Yes but klipper is a different problem ;-)

broulik added a subscriber: broulik.Oct 4 2018, 7:51 AM

There's a hint one can set now to keep Klipper from storing a content, specifically designed for password managers. I think KWalletManager should just set that. Something like

QMimeData *data = new QMimeData();
data->setText(password);
data->setData("x-kde-passwordManagerHint", QByteArrayLiteral("secret"));
qApp->clipboard()->setMimeData(data, QClipboard::Clipboard);

Do you cleanup when you close apps too ?