Security

(public)

User Story

I'm afraid the changes introduced in bug #1417874 broke the primary X selection.
Revision 463d676df5da worked fine, whereas rev. 296dd5f8849a didn't. See also https://hg.mozilla.org//mozilla-central/pushloghtml?fromchange=c35272ba2006&tochange=296dd5f8849a
Steps to reproduce:
1. start Firefox
2. start an xterm
3. mark some text in the xterm
4. change focus to Firefox
5. press middle mouse button on "URL Bar" or "Search Bar"
Expected results:
The selected text should be pasted.
Actual results:
It doesn't get pasted.
This even happens with a pristine profile and/or in safe mode. My test box runs FreeBSD 11-stable with current ports. GTK is v3.22.15. Tested with PWM and TWM.
Martin, maybe you could take a look at this once you're back? I'd be more than happy to run a few tests to further narrow down the cause or to help test patches.

Ok, here we go. Trying to paste some text using middle mouse-click, I always get the some output on the console.
No matter whether I use a (non-working) build from a few days ago, or a (working) build from early November:
(firefox:#####): Gdk-WARNING **: gdkproperty-x11.c:224 invalid X atom: -5784
This message appears exactly nine times right after each click. All tests were run using fresh profiles.
Funny enough, in the "Save Page as..." dialog, pasting from X_primary always seems to work as expected.
Oh, and "xinput --version" yields:
xinput version 1.6.2
XI version on server: 2.3

I see non working X-Selection-Paste on NetBSD too (see bug 1447774), but in my case it depends on the selection owner: with xterm all is fine, with rxvt it does not work. Difference in past code, AFAICT, is the multitude of clipboard format that xterm offers, while rxvt only does XA_STRING. Similar symptom, but probably a different cause - or maybe the reason why it works for some but not others.

You can show content of the clipboard by xclip utility. For selection it may be:
xclip -o -t TARGETS -selection
please attach output of this command when you have selected clipboard content which can't be pasted to Firefox. Also please make sure you don't overwrite it by this command (you may need to type it to the terminal).