Bug in XSS pattern matching sample?
Posted: Thu May 22, 2014 12:44 pm
First, thank you very very much for making NoScript!
I uninstalled my anti-virus software several years ago, when I found out that NoScript (plus a firewall) did the job.
As I wrote in the topic, I wonder if there is a bug in the parser for the RegEx in the XSS pattern matching sample.
As an example, If I want all of these URL's to be excluded from XSS protection..:
..I would assume the correct entry should be
However, I noticed that also this [a-z] entry
and this [a] entry
and even this [] entry
will match e.g. this URL
At first I thought that maybe the first [a-zA-Z0-9] term somehow got inserted also into the second term..
..but that does not seem to be the case either, since..
..this entry
and also even
will match this URL
I am really a very new newbie to this "RegEx world",
so it may be that there is no wrong with this behavior at all,
and instead it's just my interpretation that is wrong!
If so, I'm really sorry to have taken your time for no reason!
BTW, I am using Firefox v29.0.1 with NoScript 2.6.8.25rc2
I uninstalled my anti-virus software several years ago, when I found out that NoScript (plus a firewall) did the job.
As I wrote in the topic, I wonder if there is a bug in the parser for the RegEx in the XSS pattern matching sample.
As an example, If I want all of these URL's to be excluded from XSS protection..:
Code: Select all
http://sourceforge.net
https://sourceforge.net/
https://pre.sourceforge.net/post
https://preA2.sourceforge.net/postF5Code: Select all
^https?://([a-zA-Z0-9]+)?\.?sourceforge\.net/?([a-zA-Z0-9]+)?Code: Select all
^https?://([a-zA-Z0-9]+)?\.?sourceforge\.net/?([a-z]+)?Code: Select all
^https?://([a-zA-Z0-9]+)?\.?sourceforge\.net/?([a]+)?Code: Select all
^https?://([a-zA-Z0-9]+)?\.?sourceforge\.net/?([]+)?Code: Select all
https://preA2.sourceforge.net/postF5..but that does not seem to be the case either, since..
..this entry
Code: Select all
^http://sourceforge\.net/?([a]+)?Code: Select all
^http://sourceforge\.net/[]?Code: Select all
http://sourceforge.net/postF5so it may be that there is no wrong with this behavior at all,
and instead it's just my interpretation that is wrong!
If so, I'm really sorry to have taken your time for no reason!
BTW, I am using Firefox v29.0.1 with NoScript 2.6.8.25rc2