From f3758c1e1dd84351a3113903d9811dc694e0f475 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 25 Oct 2011 17:47:33 -0400 Subject: [PATCH] Security magic. --- common/content/dactyl.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 16461c7d..c7f8356c 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -859,8 +859,10 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { events: { click: function onClick(event) { - if (event.originalTarget instanceof Element) { - let command = event.originalTarget.getAttributeNS(NS, "command"); + let elem = event.originalTarget; + + if (elem instanceof Element && services.security.isSystemPrincipal(elem.nodePrincipal)) { + let command = elem.getAttributeNS(NS, "command"); if (command && event.button == 0) { event.preventDefault();