3 ms·
Can't this be used to poison the clipboard with bad code that once pasted in the wrong place will execute?
by ck2 11y ago
Can't this be used to poison the clipboard with bad code that once pasted in the wrong place will execute?
- rhelmer 11y agoWebsites should not be able to overwrite the clipboard unless the action is user-initiated, from the blog post: The execCommand("cut"/"copy") API is only available during a user-triggered callback, such as a click. If you try to call it at a different time, execCommand will return false, meaning that the command failed to execute.
- TheLoneWolfling 11y agoAnd? That still leaves a website open to doing that sort of thing on a click. (I can see it now: "like <website X> on Facebook today!" or somesuch copied to your clipboard every time you visit a site) User-initiated != user-approved, at least not unless the user is specifically asked. (Like by, say, prompting allow/allowalways / deny / denyalways)
- Vexs 11y agoJust as much as the existing flash-based methods can.