Bug 99317

Summary: xwayland can read clipboard without focus
Product: Wayland Reporter: pixelfairy
Component: XWaylandAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED NOTOURBUG QA Contact: Xorg Project Team <xorg-team>
Severity: major    
Priority: medium CC: jadahl
Version: unspecified   
Hardware: All   
OS: Linux (All)   
i915 platform: i915 features:

Description pixelfairy 2017-01-08 02:18:15 UTC
running this in the current (jan 2017) fedora25 in gnome-shell (wayland mode). also tried in weston.

with the xwayland module loaded, any app can see any clipboard by calling x11. 

to see this, run 'watch xsel -b' in a terminal, and copy to the clipboard from any wayland app. 

can this be changed so the x clients can only see the clipboard after getting focus? this is especially important for password keepers.
Comment 1 Jonas Ã…dahl 2017-01-09 02:05:56 UTC
I think this probably needs to be fixed in the Xwayland clipboard integration code in each compositor. It probably won't be possible to fix for X11<->X11 clients, as they talk with each other directly, but we could probably stick some branches in the wheel when X11 clients tries to steal clipboard content when a Wayland client is focused.
Comment 2 Daniel Stone 2018-06-04 07:19:14 UTC
Per Jonas's comment, closing this here so it can be tracked everywhere it happens.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.