4 ms·
How can this be implemented? You can go with the javascript approach of "you can only read the clipboard contents during an user interaction", but there's nothi
by gruez 6y ago
How can this be implemented? You can go with the javascript approach of "you can only read the clipboard contents during an user interaction", but there's nothing preventing the app from reading the clipboard every time you touch the the screen. A lot of sites use a similar exploit to bypass popup blockers. You could make so the user must accept an OS modal before the clipboard contents are released. It's more secure, but it's jarring and slows down the user.
- chrisshroba 6y agoI don't think it's jarring to use an OS modal, if that modal is the one that almost every app already uses: [1]. Perhaps this could be the default way of interacting with the clipboard, and then apps that want to be able to read it a different way (e.g. Google Chrome wanting to be able to offer you a "Go To Link You Copied" button) could request an additional permission. [1]: https://cdn4syt-solveyourtech.netdna-ssl.com/wp-content/uploads/2014/03/iphone-5-ios-7-copy-and-paste-5.jpg https://cdn4syt-solveyourtech.netdna-ssl.com/wp-content/uplo...
- gruez 6y agoThat's not a modal, that's just a standard widget. I'm not sure how they're implemented in iOS, but they can be subject to clickjacking attacks.
- _visgean 6y agoThe clipboard should be on the level of virtual keyboard. The app should not see whats in the clipboard before pasting. Don't see much of an issue with implementation.
- gruez 6y agoHow would that work with non-text applications? eg. a photo editor. Would the application need to bring up the keyboard just so the user can paste? Screen real estate is also an issue. Mobile keyboards are cramped as it is, adding a paste button would either require it being buried behind another layer, or take up more screen real estate.
- stanmancan 6y agoThere should be no “reading the clipboard” at all. A “paste” should result in the OS providing the contents to the app, not signalling the app to read the clipboard.
- gruez 6y agoYour solution of "only let the OS initiate pasting" only really works when dealing with os provided text editing widgets. What if an app wants to implement a paste button/gesture? eg. paste and go to url that chrome/safari has, or terminal emulators that paste on control-shift-v rather than control-v, or photo editors that don't really have a text box to "paste" to begin with.
- pavel_lishin 6y agoYes, these are hard problems, but I would prefer that they either be solved - or go without some features - rather than let every app be able to read the contents of my clipboard.
- kshacker 6y agoHard problems sometimes (but not always) have simple solutions. Putting apps copying clipboard up in your face is one such solution and it seems to be highlighting the abusers, no? Even if an app has a genuine need to copy clipboard, having it in front of user every time will be useful.
- stanmancan 6y agoI know those are probably just a few examples of many but: Paste and go isn’t a feature worth sacrificing the privacy of your clipboard contents Terminal emulators, not sure to be honest. Why not stick to traditional cut and paste shortcuts? Photo editors: nobody said you need a text box to paste to. Set your UI element as “pasteable” or whatever’s needed and let the app handle whatever clipboard contents comes it’s way. If it’s not supported it gets ignored.
- gentleman11 6y agoHave the browser (or OS) implement a clipboard. To paste, the middle-man software (either the OS or the browser) just inserts characters one after the other from this clipboard. Similarly, to insert text into it, make a request to this middle-man software. Not kernel level of course, but built in. If its windows, call it "clippy" and bring back that paperclip character.