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

Advanced Paste automatically paste into slack chat on focus #32971

Closed
brainfoolong opened this issue May 22, 2024 · 20 comments
Closed

Advanced Paste automatically paste into slack chat on focus #32971

brainfoolong opened this issue May 22, 2024 · 20 comments
Assignees
Labels
Hot Fix Items we will product an out-of-band release for Issue-Bug Something isn't working Product-Advanced Paste Refers to the Advanced Paste module Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@brainfoolong
Copy link

brainfoolong commented May 22, 2024

Microsoft PowerToys version

0.81.0

Installation method

PowerToys auto-update

Running as admin

None

Area(s) with issue?

Advanced Paste

Steps to reproduce

I attach a video the shows the behaviour. On Windows, when i have closed slack into systray and then open a chat window, all clipboard data is automatically inserted into slack. Even files i have copied in file explorer.

This does not happen when i just minimize to task bar instead of systray.

I do not press any key. Just open with a click on the systray icon.

The only plugin i have activated is Advanced Paste (Screenshot bellow). If i disable just this plugin or close power toys, the auto insert is gone.

This started immediately after todays update to 0.81.0.

This behaviour can lead to serious data breach if you do not pay attention.

powertoys.webm

image

✔️ Expected Behavior

No auto insert in any application.

❌ Actual Behavior

Auto insert with just focusing a window....

Other Software

Slack

Report

PowerToysReport_2024-05-22-13-13-02.zip

@brainfoolong brainfoolong added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels May 22, 2024
@stefansjfw
Copy link
Collaborator

Hi, could you attach /bugreport?
Thank you

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels May 22, 2024
@stefansjfw
Copy link
Collaborator

Does this happen with slack only? Or with other apps as well? Could you try e.g. notepad?

@stefansjfw stefansjfw added the Product-Advanced Paste Refers to the Advanced Paste module label May 22, 2024
@brainfoolong
Copy link
Author

brainfoolong commented May 22, 2024

Report added to original post.

No, as of now i only can see this in Slack. Signal, Notepad and office works fine, as far as i can see.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels May 22, 2024
@brainfoolong
Copy link
Author

brainfoolong commented May 22, 2024

I have debugged further and indeed, PowerToys make my system sending 1 special keystrokes when this plugin is enabled. I do not press any key (later i do CTRL+A and delete to remove pasted text), but when i use screenrecorder to record also system keystrokes, is see 1 'CTRL+V' automagically, when i just click the systray of slack. When i disable the powertoys plugin, no keystroke is sending anymore.

See new video.

powertoys-2.webm

@jaimecbernardo
Copy link
Collaborator

We've debugged and it's that when there's no key set for Paste as Markdown or JSON we're actually catching the "none" shortcut.
When you press Slack's tray icon, it sends the "None" shortcut.
@stefansjfw is working on a fix

@jaimecbernardo jaimecbernardo added Hot Fix Items we will product an out-of-band release for and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up labels May 22, 2024
@kuleshov-aleksei
Copy link

kuleshov-aleksei commented May 22, 2024

I have the same exact issue. Seems like that does not affect other applications that can be opened from systray (like discord or spotify)

@stefansjfw
Copy link
Collaborator

Very good catch. PR opened with the fix

@jaimecbernardo jaimecbernardo added the Status-In progress This issue or work-item is under development label May 22, 2024
@jaimecbernardo jaimecbernardo pinned this issue May 22, 2024
@jaimecbernardo
Copy link
Collaborator

As a workaround for the time being, you can set a shortcut for "Paste as Markdown" and "Paste as JSON" and it should no longer exhibit this behavior.

@MitchSchwartz
Copy link

MitchSchwartz commented May 22, 2024

Validating that I have this issue and that setting a shortcut for "Paste as Markdown" seems to have solved it.

Will see if I now start getting JSON pastes until I set that as well or if I only had that issue with markdown.
Edit: No surprise, I did. Had to fill that hotkey too.

Also curious, though out of scope: what is slack doing to trigger this?

@Dominiquini
Copy link

I'm having this problem when I try to rearrange my opened tabs on Windows Terminal (drag one of my tabs from one place to another)! When I do this, a bunch of texts are paste in the dragged terminal!

Thanks.

@stefansjfw
Copy link
Collaborator

stefansjfw commented May 24, 2024

Also curious, though out of scope: what is slack doing to trigger this?

@MitchSchwartz Left-clicking Slack systray icon sends None keyboard key. As these hotkeys were not set, and all modifier keys are not pressed this matched our not-set hotkey default state.

@Dominiquini Does setting To Markdown and To JSON hotkeys make the problem go away for you ?

@Dominiquini
Copy link

Also curious, though out of scope: what is slack doing to trigger this?

@MitchSchwartz Left-clicking Slack systray icon sends None keyboard key. As these hotkeys were not set, and all modifier keys are not pressed this matched our not-set hotkey default state.

@Dominiquini Does setting To Markdown and To JSON hotkeys make the problem go away for you ?
Yes, this solve the problem. Thanks!

@zadjii-msft
Copy link
Member

I'm gonna chime in here with microsoft/terminal#17324 as well. Looks like dragging a Terminal tab with Advanced Paste enabled will also repro similar behavior.

@DHowett
Copy link
Member

DHowett commented May 28, 2024

So this is why I keep finding weird stuff pasted into Slack!

@fritzmg
Copy link

fritzmg commented May 28, 2024

Wonder how many unsolicited pr0n links and sensitive credentials have been submitted accidentally by this bug :]

@vitaminj
Copy link

The Slack issue is slightly annoying, but the Terminal problem (where it repeatedly pastes as you drag around) is potentially more serious if you have a multiline command in your clipboard. Imagine copying a command to delete the most recent row from a db table. Drag the tab around and a whole boatload of rows are gone! Really surprised they haven't pushed out a hotfix to this yet!

@epikkoder
Copy link

The Slack issue is slightly annoying, but the Terminal problem (where it repeatedly pastes as you drag around) is potentially more serious if you have a multiline command in your clipboard. Imagine copying a command to delete the most recent row from a db table. Drag the tab around and a whole boatload of rows are gone! Really surprised they haven't pushed out a hotfix to this yet!

@vitaminj Version v0.81.1 Is now out with the fix.

@ThaDaVos
Copy link

ThaDaVos commented Jun 7, 2024

Thank you for fixing this - was driving me crazy the past week - but was happening for me with Clarion based software, each time I opened it or triggered a new window to open - just fyi

@nabeelr
Copy link

nabeelr commented Jun 13, 2024

Wonder how many unsolicited pr0n links and sensitive credentials have been submitted accidentally by this bug :]

Passwords would be my concern. Lots of people use password managers, and they often use the clipboard to paste passwords into text fields...

@mutebmuhd1403
Copy link

Microsoft PowerToys version

0.81.0

Installation method

PowerToys auto-update

Running as admin

None

Area(s) with issue?

Advanced Paste

Steps to reproduce

I attach a video the shows the behaviour. On Windows, when i have closed slack into systray and then open a chat window, all clipboard data is automatically inserted into slack. Even files i have copied in file explorer.

This does not happen when i just minimize to task bar instead of systray.

I do not press any key. Just open with a click on the systray icon.

The only plugin i have activated is Advanced Paste (Screenshot bellow). If i disable just this plugin or close power toys, the auto insert is gone.

This started immediately after todays update to 0.81.0.

This behaviour can lead to serious data breach if you do not pay attention.

powertoys.webm

image

✔️ Expected Behavior

No auto insert in any application.

❌ Actual Behavior

Auto insert with just focusing a window....

Other Software

Slack

Report

PowerToysReport_2024-05-22-13-13-02.zip

@jaimecbernardo jaimecbernardo unpinned this issue Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hot Fix Items we will product an out-of-band release for Issue-Bug Something isn't working Product-Advanced Paste Refers to the Advanced Paste module Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
Development

No branches or pull requests

15 participants