diff options
author | Lucian Branescu Mihaila <lucian.branescu@gmail.com> | 2009-07-29 16:46:26 (GMT) |
---|---|---|
committer | Lucian Branescu Mihaila <lucian.branescu@gmail.com> | 2009-07-29 16:46:44 (GMT) |
commit | a8c8fd55008d38e8a46430d833bb71ae366bd1ca (patch) | |
tree | 0acbff2a7b9d5e63dd53b25332224070b6618ea7 /usercode.py | |
parent | f3208fad41a7dbbb027d696b8c0a1db6d3bb0800 (diff) |
Replace data URI download hack with another, smaller hack. trac #1029
Diffstat (limited to 'usercode.py')
-rw-r--r-- | usercode.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/usercode.py b/usercode.py index e62b339..7a77b40 100644 --- a/usercode.py +++ b/usercode.py @@ -255,16 +255,13 @@ class Injector(): interfaces.nsIDOMEventListener) def handleEvent(self, event): - logging.debug('***** finish inject') - logging.debug('***** %s' % self.head.innerHTML) self.head.appendChild(self.script) def attach_to(self, window): - logging.debug('***** starting inject') # set up the script element to be injected self.script = window.document.createElement('script') self.script.type = 'text/javascript' - #self.script.src = 'file://' + self.script_path # XSS security fail + # working around XSS security text = open(self.script_path,'r').read() self.script.appendChild( window.document.createTextNode(text) ) @@ -273,7 +270,6 @@ class Injector(): # actual attaching window.addEventListener('load', self._wrapped, False) - logging.debug('***** injecting ...') class ScriptListener(gobject.GObject): |