Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipboard: Add option to block proxying of passwords #1894

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/service/components/clipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ const Clipboard = GObject.registerClass({
if (mimetypes.includes('text/uri-list'))
return;

// Special case to avoid copying identifiable passwords,
// for privacy reasons.
// (See https://github.com/GSConnect/gnome-shell-extension-gsconnect/issues/1893)
// TODO: Should there be a preference to re-enable password-sharing,
// for users who desire it?
if (mimetypes.includes('x-kde-passwordManagerHint'))
return;

const text = await new Promise((resolve, reject) => {
this._clipboard.request_text((clipboard, text) => resolve(text));
});
Expand Down