We try our best to keep ZeroClipboard secure but there are some rules that you should consider following to keep your site safe.
For the existing configuration options available for security, see Configuration Options.
Basically, if an attacker gets access to the main window/global object via an XSS exploit, it's pretty much an instant "GAME OVER" unless ALL of the following are true:
ZeroClipboard
object itself is not globally accessible.ZeroClipboard.prototype
object itself is not globally accessible.ZeroClipboard
instances are globally accessible.ZeroClipboard.config
, that variable must not be globally accessible.data-clipboard-text
and data-clipboard-target
attributes).ZeroClipboard
instances globally accessible (versus encapsulated in a closure). This allows an attacker to manually call a client's setText
method and inject their own text.ZeroClipboard
or ZeroClipboard.prototype
properties or methods, if globally accessible.data-clipboard-text
or data-clipboard-target
attributes to every element in the DOM.If you find any security holes that you believe can be patched, please submit a pull request or file an issue. We will be very appreciative!