Hello,
I would like to understand how I can write an external filter.
Is there anything available how to build them? Maybe a tutorial?
Cheers,
external filters
-
- Posts: 2
- Joined: Wed Apr 25, 2012 12:06 pm
external filters
Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20100101 Firefox/6.0
- Giorgio Maone
- Site Admin
- Posts: 9454
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: external filters
An external filter is an executable which takes the following arguments:
- original_file_path path to local file where the content to be filtered has already been saved by NoScript
- clean_file_path path to an empty temporary local file created by NoScript, where the filter should write the "clean" version of the content
- originURL URL of the document embedding the content
- contentURL URL of the embedded content
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0
-
- Posts: 2
- Joined: Wed Apr 25, 2012 12:06 pm
Re: external filters
Thanks for your quick response. If I get it right, a perl script
could do this job -- which would enable to include privoxy-type
scripts into noscript.
That is pretty cool, since privoxy cannot handle ssl connections,
but noscript does since it sits inside the browser !
could do this job -- which would enable to include privoxy-type
scripts into noscript.
That is pretty cool, since privoxy cannot handle ssl connections,
but noscript does since it sits inside the browser !
Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20100101 Firefox/6.0
-
- Posts: 1
- Joined: Fri May 18, 2012 8:46 am
Re: external filters
Hi!
I want to modify xss filter (add some new rules). Which is the best way to do it? Modifying source code or through the external filter?
p.s. which file contains xss fitering regexp?
I want to modify xss filter (add some new rules). Which is the best way to do it? Modifying source code or through the external filter?
p.s. which file contains xss fitering regexp?
Opera/9.80 (Windows NT 6.1; U; ru) Presto/2.10.229 Version/11.64
Re: external filters
I don't think that that's the kind of filter that 'external filter' means. External filters are for things like sanitising Flash. Notice that they're associated with a MIME type.Zloy Strelok wrote: I want to modify xss filter (add some new rules). Which is the best way to do it? Modifying source code or through the external filter?
p.s. which file contains xss fitering regexp?
Giorgio keeps control of the code, so if you want to submit patches, you'll need to go through him. If you just want to try things out on your local copy, though, then yes, modify the source code.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0
Re: external filters
NoScript's XSS filter can have exceptions added through the GUI. NS Options > Advanced > XSS.Zloy Strelok wrote:I want to modify xss filter (add some new rules). Which is the best way to do it? Modifying source code or through the external filter?
p.s. which file contains xss fitering regexp?
Add your regexp in the Exceptions box.
But the bigger question is: Why is XSS being triggered? If it's a false positive, both the site and we should know about it. The sensitivity of the checker has been fine-tuned many times based on such user reports.
If it's a genuine XSS, you're putting yourself at great risk to add an exception. Either way, it needs to be resolved.
I have NOTHING in XSS exceptions, and it's hardly ever been an issue -- one or two false positives over the years.
If you're talking about *tightening* the XSS protections, then could you please share your suggestions with the rest of us? This sub-forum is for just that.
NS developer Giorgio Maone will consider it, and either accept the suggestion, or explain why it isn't wise or feasible. Please don't modify NS source code. Thanks.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/12.0