[RESOLVED] XSS whitelisting
[RESOLVED] XSS whitelisting
Please make a simple way to white list for XSS. The regular expression cr*p is confusing. Been trying for months to figure out how to use it, not just for this, and not getting anywhere.
Why cant this list be a simple website list?
Can someone help me fix www.se.no/tv/ so I can use my tv guide again?
Thank you
Why cant this list be a simple website list?
Can someone help me fix www.se.no/tv/ so I can use my tv guide again?
Thank you
Last edited by Tom T. on Wed Mar 28, 2012 3:05 am, edited 2 times in total.
Reason: make a little more family-friendly
Reason: make a little more family-friendly
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0
Re: XSS whitelisting
Probably because the detection and prevention of the various types of XSS, and the minimization of false positives, is more complex than simply whitelisting a script or site, though I could be mistaken.Gazer75 wrote:Please make a simple way to white list for XSS. The regular expression cr*p is confusing. Been trying for months to figure out how to use it, not just for this, and not getting anywhere.
Why cant this list be a simple website list?
As a quick-and-dirty work-around, this made the XSS notification go away for me:
Code: Select all
^https?://konto\.dagbladet\.no/.*
Ahh -- going further, a pop-up opens, asking for login creds, and that pop-up has a blocked object that requires further permission.
Code: Select all
Temporarily allow http://www.se.no/xdr/xd_receiver.html#fname=clientLogin$namespace=DB.Client
(text/html <IFRAME> / https://konto.dagbladet.no)
Confirmed as also successfully removing the XSS notification on Fx 11.0 as well as 3.6.28.
I'll let him know. Please confirm that the work-around works in the meantime.
"The Big Bang Theory" is popular there?

@ Giorgio:
Code: Select all
[NoScript InjectionChecker] JavaScript Injection in ///api/xdr/dev/#host=www.se.no$xdr=xdr/xd_receiver.html$sf=checkServerLogin
(function anonymous() {host = www.se.no$xdr = xdr;DUMMY_EXPR;})
[NoScript XSS] Sanitized suspicious request. Original URL [https://konto.dagbladet.no/api/xdr/dev/#host=www.se.no$xdr=xdr/xd_receiver.html$sf=checkServerLogin] requested from [http://www.se.no/tv/#]. Sanitized URL: [https://konto.dagbladet.no/api/xdr/dev/#6425552468366076828].
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28
- Giorgio Maone
- Site Admin
- Posts: 9524
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: XSS whitelisting
It is a false positive, indeed, caused by the weird hash parameters convention which overlaps with JavaScript syntax.
I'll try to "desensitize" the InjectionChecker module to this pattern in a future version.
In the meanwhile, thanks Tom T. for the suggested work-around, which can further be tweaked this way to be more specific:
I'll try to "desensitize" the InjectionChecker module to this pattern in a future version.
In the meanwhile, thanks Tom T. for the suggested work-around, which can further be tweaked this way to be more specific:
Code: Select all
^https?://konto\.dagbladet\.no/[^<"']+#
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0
Re: XSS whitelisting
Thank you!
I love NoScript, but sometimes it makes me scratch my head
Sorry if the language was a bit harsh. Regex really makes me angry as I can't seem to figure out out it works...
Any good sites that can teach me?
I love NoScript, but sometimes it makes me scratch my head

Sorry if the language was a bit harsh. Regex really makes me angry as I can't seem to figure out out it works...
Any good sites that can teach me?
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0
Re: XSS whitelisting
Good or bad, don't know, but ... Wikipedia: Regular expression.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120327 Firefox/13.0a2 SeaMonkey/2.10a2
Re: XSS whitelisting
@ Gazer75:
Else, it becomes overwhelming for the novice.
Perhaps let the webmaster know of the issue, and of Giorgio's recommendation to modify their syntax? Link to this thread...
@ Giorgio:
Thanks for the confirmation as false positive, the possible future tweak of InjectionChecker (can't anyone tell these sites not to use parameters that may collide with JS?), and the fine-tuning. It was near the end of my session, and I wanted to give OP *something* that would work while it was still fairly early in the indicated region's day.
Will mark as Resolved, thanks.
It's good, but to avoid information overload, I'd suggest focusing on "Basic Concepts", "Syntax", and "Posix" (including all subsections).therube wrote:Good or bad, don't know, but ... Wikipedia: Regular expression.
Else, it becomes overwhelming for the novice.
Perhaps let the webmaster know of the issue, and of Giorgio's recommendation to modify their syntax? Link to this thread...
@ Giorgio:
Thanks for the confirmation as false positive, the possible future tweak of InjectionChecker (can't anyone tell these sites not to use parameters that may collide with JS?), and the fine-tuning. It was near the end of my session, and I wanted to give OP *something* that would work while it was still fairly early in the indicated region's day.

Will mark as Resolved, thanks.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28
- Giorgio Maone
- Site Admin
- Posts: 9524
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: [RESOLVED] XSS whitelisting
Please check latest development build 2.3.7rc1: it should work even without exceptions.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0
Re: [RESOLVED] XSS whitelisting
Confirmed that with NS 2.3.7rc1, the site works all the way through the loading of the pop-up login box, with no XSS messages, nothing pertinent in Error Console, and with zero XSS exceptions, in both Fx 11.0 and (what's left of) Fx 3.6.28, thanks.Giorgio Maone wrote:Please check latest development build 2.3.7rc1: it should work even without exceptions.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28
Re: [RESOLVED] XSS whitelisting
Considering regular expressions, http://perldoc.perl.org/perlre.html and https://developer.mozilla.org/en/JavaSc ... on_Pattern look like quite good summaries (in former you just need to ignore all the Perl-specific stuff).
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0
Re: [RESOLVED] XSS whitelisting
Consult a Perl guide, but ignore all Perl-specific stuff?dhouwn wrote:Considering regular expressions, http://perldoc.perl.org/perlre.html <snip> ignore all the Perl-specific stuff).

Can't argue with the MDN link, but as the name implies, it's targeted to developers (presupposing a good bit of knowledge and experience). WP article seems more targeted to a lay audience, but it's OP's call.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28