|
|
Subscribe / Log in / New account

terminal paste protection : why not at browser level?

terminal paste protection : why not at browser level?

Posted Apr 1, 2018 23:13 UTC (Sun) by roc (subscriber, #30627)
In reply to: terminal paste protection : why not at browser level? by Herve5
Parent article: A look at terminal emulators, part 1

It's hard to do that in the browser in a foolproof way because it's difficult to determine "what actually was displayed".

For example, is text inside "font-size:1px" displayed? How about text inside "opacity:0.05"? How about "background:black; color:rgb(5,5,5)"? How about homoglyphs? What about using relative positioning, line-height, letter-spacing etc to overprint or reorder text?

The most foolproof way might be to determine the copied text by performing OCR on the pixel data ... except of course there are interesting ways to fool OCR too.


to post comments

terminal paste protection : why not at browser level?

Posted Apr 2, 2018 18:46 UTC (Mon) by iabervon (subscriber, #722) [Link] (1 responses)

It might be possible to have a tooltip-style popup that says what it was that the browser put in the clipboard, and let the user be surprised or not.

terminal paste protection : why not at browser level?

Posted Apr 3, 2018 18:45 UTC (Tue) by Herve5 (subscriber, #115399) [Link]

Roc, you are right. At the end of my 'browser addon quest' I found one that may have allowed running some regexp onto the clipboard contents, and I imagined some wiser guy would propose the killer Regexp, but now having read your post I'm far less sure about that ;-)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds