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

Command "Ignore *"Password"* window" doesn't work #2771

Open
elbowz opened this issue Jul 11, 2024 · 6 comments
Open

Command "Ignore *"Password"* window" doesn't work #2771

elbowz opened this issue Jul 11, 2024 · 6 comments
Labels

Comments

@elbowz
Copy link

elbowz commented Jul 11, 2024

Describe the bug
The password copied from KeeWeb (password manager) are still saved in the copyq history

To Reproduce
Steps to reproduce the behavior:

  1. Enable the command by F6 shortcut
  2. Set the correct window title
  3. Copy something on the password manger (eg. KeeWeb)

Expected behavior
The copied text shouldn't appear in CopyQ

Screenshots

Version, OS and Environment

% copyq version
CopyQ Clipboard Manager 9.0.0
Qt: 5.15.14
KNotifications: 5.116.0
Compiler: GCC
Arch: x86_64-little_endian-lp64
OS: Arch Linux
Operating System: Arch Linux 
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.9.8-arch1-1 (64-bit)
Graphics Platform: Wayland

Additional context
The command source:

[Command]
Automatic=true
Command="
    copyq ignore"
Icon=\xf069
Name=Ignore *\"KeeWeb|Password\"* window
Remove=true
Window=KeeWeb|Password

CopyQ log: https://pastebin.com/T2PYENcZ

FYI: if I start CopyQ with "env QT_QPA_PLATFORM=xcb copyq", it stops to record the text copied, it only store the last one before open copyq (if you need I can record a screencast for you)

Thanks

@elbowz elbowz added the bug label Jul 11, 2024
@hluk
Copy link
Owner

hluk commented Jul 12, 2024

Unfortunately, the Wayland version of the app does not support getting window title. See also: https://copyq.readthedocs.io/en/latest/known-issues.html#known-issue-wayland

CopyQ now ignores secrets copied from password managers and other apps out of the box. The problem is that some apps do not indicate properly that clipboard contains a secret/password.

Can you check what formats are listed in the clipboard after you copy something from KeeWeb? You can inspect the formats by selecting File - Show Clipboard Content from menu bar in CopyQ (Ctrl+Shift+C).

@elbowz
Copy link
Author

elbowz commented Jul 12, 2024

Unfortunately, the Wayland version of the app does not support getting window title. See also: https://copyq.readthedocs.io/en/latest/known-issues.html#known-issue-wayland

I don't read anything about window title on that page. I have try also install the suggested CopyQ command/script Wayland Support without luck.

Before CopyQ worked by forcing it to run on X11 (ie env QT_QPA_PLATFORM=xcb copyq), but It doesn't work anymore. It doesn't save the clipboard history.

Can you check what formats are listed in the clipboard after you copy something from KeeWeb? You can inspect the formats by selecting File - Show Clipboard Content from menu bar in CopyQ (Ctrl+Shift+C).

Screenshot_20240712_125838

I don't think there is any way to tell that the text copied from KeeWeb is a password, is there?

Thanks for your quick reply and help!

@hluk
Copy link
Owner

hluk commented Jul 12, 2024

I don't read anything about window title on that page. I have try also install the suggested CopyQ command/script Wayland Support without luck.

Ah, I think I only mentioned it in the initial issue (#27). I will add the info.

The command currently only adds support for getting window titles in Sway and Hyprland compositors.

Before CopyQ worked by forcing it to run on X11 (ie env QT_QPA_PLATFORM=xcb copyq), but It doesn't work anymore. It doesn't save the clipboard history.

That's bad, I guess it depends on the Wayland compositor and desktop environment.

I don't think there is any way to tell that the text copied from KeeWeb is a password, is there?

Yeah, unfortunately, I don't see any formats that would indicate a secret.

BTW, you can try using Ignore Passwords/Tokens command which is detecting potential passwords/tokens in the copied text - but it sometimes matches other non-password things.

@elbowz
Copy link
Author

elbowz commented Jul 15, 2024

BTW, you can try using Ignore Passwords/Tokens command which is detecting potential passwords/tokens in the copied text - but it sometimes matches other non-password things.

Nice, can be useful. At least, it's better to have false positive (ie. password detected and not saved) than false negative.

Thanks for your help! :)

@elbowz
Copy link
Author

elbowz commented Jul 15, 2024

Excuse me, I would like to open a feature request for KeeWeb, about this password format.
Could you provide some information on what kind of format should be provided?

I found something about application/x-kde-passwordManagerHint mime type, but It seems specific for kde. What mime type does copyq need...thanks!

@hluk
Copy link
Owner

hluk commented Jul 19, 2024

Could you provide some information on what kind of format should be provided?

This is how CopyQ knows that the clipboard is not meant to be stored or further processed:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants