WTF...is there some way to block this API from being called in Safari?
WTF...is there some way to block this API from being called in Safari?
Or indeed, put some malware site on my clipboard.
Either way, it’s my clipboard and no website should be able to change it without my permission.
Copied from https://webkit.org/blog/10855/async-clipboard-api/:
"The request to write to the clipboard must be triggered during a user gesture. A call to clipboard.write or clipboard.writeText outside the scope of a user gesture (such as click or touch event handlers) will result in the immediate rejection of the promise returned by the API call."
Thankfully it didn't run anything serious, but ever since then, I've been careful to paste things into an editor to make sure that the browser copied the exact text that I selected. I understand there are specific needs to programmatically copy things to the clipboard, but I'd consider it a risk/vulnerability open to abuse.