Live data from Hacker News

With Firefox on X11, any page can pastejack you anytime (middle button paste)

openwall.com

81–90 of 195 posts

Re: With Firefox on X11, any page can pastejack you anytime (middle button paste)

#81

The problem is the middle paste option in Firefox. To turn it off do as follow: open a new tab type: about:config Accept the prompt type middlemouse.paste change value “true” to “false” (double click or switch on the rightside) restart firefox --does this solve it?

No, that's only for pasting specifically.

It's copy that's an exploit vector.

To disable it, set clipboard.autocopy to false.

Re: With Firefox on X11, any page can pastejack you anytime (middle button paste)

#82
post #70

Earlier quoted context omitted.

Why is it so easy to find people in this industry who don't care that users can't trust their own computers (or, by extension, anything they own with a computer in it, which is quickly becoming everything)? If I select some text and press Ctrl+C, it should copy the text I selected. The user intent is obvious. There's no excuse for the ability to hijack the clipboard to exist in the first place. Web pages shouldn't be…

> Web pages shouldn't be able to modify my selection. Why is there even an API for this? To make “copy to clipboard” buttons possible.

I have a copy to clipboard button that's standard across all apps and has decades of precedence: Ctrl+c. Some (older?) keyboards even label it!

On my phone, if I select text, my browser pops up a menu with "copy" as an option.

Why does a web page need to reinvent that wheel?

For the 1/10000000 case where it makes sense, how about a "X page wants to modify your clipboard" dialog? This has been a known security vulnerability for at least a decade.

Edit: actually, I just noticed that was a reply to selection, which makes even less sense. Just let the user select what they want.

Re: With Firefox on X11, any page can pastejack you anytime (middle button paste)

#83

Earlier quoted context omitted.

I cannot stand any Operating System that does not utilize left-click highlight and middle click paste. This is great secondary buffer to the clipboard Ctrl+C && Ctrl+V. I HATE the middle click scrolling feature that Windows uses, it is not user-friendly and not needed in the age of the scroll-wheel. Another reason you have to pay me to use Windows.

What makes that feature "not user-friendly" instead of just a personal preference?

Not OP, but I can say that it is a mode, which is its problem. You enter into the scroll mode and while not difficult per se to exit it can cause confusion. It is also pretty superfluous in the age of the touchpad and the ubiquity of the scroll wheel. Just another example of Microsoft working really hard to make Windows 11 look simpler, but not working on making it meaningfully simpler.

Re: With Firefox on X11, any page can pastejack you anytime (middle button paste)

#84
post #70

Earlier quoted context omitted.

> Web pages shouldn't be able to modify my selection. Why is there even an API for this? To make “copy to clipboard” buttons possible.

I have a copy to clipboard button that's standard across all apps and has decades of precedence: Ctrl+c. Some (older?) keyboards even label it! On my phone, if I select text, my browser pops up a menu with "copy" as an option. Why does a web page need to reinvent that wheel? For the 1/10000000 case where it makes sense, how about a "X page wants to modify your clipboard" dialog? This has been a known security vulnera…

When copying Unicode characters from sites like symbl.cc, it would be incredibly annoying to have to select them and press Ctrl+C instead of just pressing a single button.

Re: With Firefox on X11, any page can pastejack you anytime (middle button paste)

#85
post #5

I am surprised that Firefox freely allows access to the clipboard. I'm using Brave and there's an explicit permission for it that is disallowed by default.

I am using Brave on Linux where I do all my work as well that might by why "copy to CB" on websites do not work for me anymore. I think they did. But there is nothing asking me for permission or anything. I recently was on a website where it just did not work and I needed to manually copy pasta.

have a look at

  brave://settings/content/clipboard

Re: With Firefox on X11, any page can pastejack you anytime (middle button paste)

#86
post #31

The X “primary selection”/middle click paste behavior this takes advantage of is one of my least favorite Linux features and I have had it disabled for years, so I didn’t even know it had been changed/removed in Wayland. Having a single mouse button (that often has other functionality like autoscroll in Firefox) cause text highlighted in another app to paste in the focused app is super unintuitive to me, and caused a…

I cannot stand any Operating System that does not utilize left-click highlight and middle click paste. This is great secondary buffer to the clipboard Ctrl+C && Ctrl+V. I HATE the middle click scrolling feature that Windows uses, it is not user-friendly and not needed in the age of the scroll-wheel. Another reason you have to pay me to use Windows.

It’s been many years since I used Windows on a daily basis but that middle click scrolling feature was one of my favorite things about it. You could activate it and position the mouse cursor just right so that the page moved with your reading speed and then you could just focus your eyes along one “line” and read that way. Hands-free scrolling after it is setup.

Re: With Firefox on X11, any page can pastejack you anytime (middle button paste)

#87
post #65
post #31

The X “primary selection”/middle click paste behavior this takes advantage of is one of my least favorite Linux features and I have had it disabled for years, so I didn’t even know it had been changed/removed in Wayland. Having a single mouse button (that often has other functionality like autoscroll in Firefox) cause text highlighted in another app to paste in the focused app is super unintuitive to me, and caused a…

I don’t care about middle-click paste, but having selection auto-copy is also implemented by terminal emulators like Putty on Windows, and I wouldn’t want to miss that. What’s problematic with the Firefox behavior is that content gets copied (pasted) that wasn’t selected by the user.

It's absolutely no different than if the actual HTML contained invisible text though.

The patch here would not help security at all. Only using control-x control-e before pasting (so that it comes into a real editor, not directly in the terminal) can help.

Re: With Firefox on X11, any page can pastejack you anytime (middle button paste)

#88
My list of reasons to block all javascript by default grows longer by the day. 90% of websites don't need javascript at all to display the content I'm looking for, about 9% only require first party javascript, and the 1% left usually just gets me to close the tab and go somewhere else.

Re: With Firefox on X11, any page can pastejack you anytime (middle button paste)

#89
post #31

The X “primary selection”/middle click paste behavior this takes advantage of is one of my least favorite Linux features and I have had it disabled for years, so I didn’t even know it had been changed/removed in Wayland. Having a single mouse button (that often has other functionality like autoscroll in Firefox) cause text highlighted in another app to paste in the focused app is super unintuitive to me, and caused a…

This sounds like a one of the few good reasons to switch to Wayland, if this can really be disabled.

Re: With Firefox on X11, any page can pastejack you anytime (middle button paste)

#90
post #86

Earlier quoted context omitted.

I cannot stand any Operating System that does not utilize left-click highlight and middle click paste. This is great secondary buffer to the clipboard Ctrl+C && Ctrl+V. I HATE the middle click scrolling feature that Windows uses, it is not user-friendly and not needed in the age of the scroll-wheel. Another reason you have to pay me to use Windows.

It’s been many years since I used Windows on a daily basis but that middle click scrolling feature was one of my favorite things about it. You could activate it and position the mouse cursor just right so that the page moved with your reading speed and then you could just focus your eyes along one “line” and read that way. Hands-free scrolling after it is setup.

I’ve used it just like that on Firefox on Mac and Linux for years. I generally prefer a mouse to a trackpad and it’s a way nicer interaction than using the scroll wheel to jump down the page.
Post reply on HN