Anti-XSS protection hates Dropbox

Ask for help about NoScript, no registration needed to post
RoestVrijStaal

Anti-XSS protection hates Dropbox

Post by RoestVrijStaal »

Hello,

With which regex-rule do I whitelist Dropbox in the XSS-filter?

Because Anti-XSS protection prevents me to download files via the webinterface of Dropbox.

I tried

Code: Select all

^https?://[a-z0-9]+\.dropbox\.com.+$
as whitelist rule but NoScript didn't like to eat it. So I wonder which is the good one and if I'm the only lucky person who has this issue.

Thanks in advance,

RoestVrijStaal
Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101 Firefox/20.0
access2godzilla
Senior Member
Posts: 109
Joined: Sun May 20, 2012 5:09 pm

Re: Anti-XSS protection hates Dropbox

Post by access2godzilla »

The regex:

Code: Select all

^https?://[a-z0-9]+\.dropbox\.com.+$
has some problems:
  • A subdomain becomes compulsory due to the presence of [a-z0-9]+\.
  • The end \.com.+$ allows too much. It will also allow an URL like [url=http://www.dropbox.com.foobar..phishing.domain.example.com/]http://www.dropbox.com.foobar..phishing.domain.example.com/[/url] (such phishing sites exist, have a look around Phishtank).
This should work:
^https?://([a-z0-9]+\.)?dropbox\.com/.*

Code: Select all

^https?://([a-z0-9]+\.)*dropbox\.com/.*
Note: post was edited, see reason below.
Last edited by access2godzilla on Fri Apr 12, 2013 9:01 am, edited 1 time in total.
Opera/9.80 (Android; Opera Mini/7.5.31657/29.3183; U; en) Presto/2.8.119 Version/11.10
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Anti-XSS protection hates Dropbox

Post by Thrawn »

Actually, that rule will only allow a single subdomain, eg foo.dropbox.com. The question mark (after the brackets) should be an asterisk, to allow foo.bar.baz.dropbox.com.

Are you sure that you want to allow http (unencrypted) connections? I would drop the question mark after https.

You should also check whether Dropbox subdomains use other characters like hyphens, underscores, etc.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0
access2godzilla
Senior Member
Posts: 109
Joined: Sun May 20, 2012 5:09 pm

Re: Anti-XSS protection hates Dropbox

Post by access2godzilla »

Thrawn wrote:Actually, that rule will only allow a single subdomain, eg foo.dropbox.com. The question mark (after the brackets) should be an asterisk, to allow foo.bar.baz.dropbox.com.
Good point, edited previous post to reflect this.
Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120403211507 Firefox/12.0
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Anti-XSS protection hates Dropbox

Post by Thrawn »

By the way, are you sure that Dropbox is actually immune to xss attacks?
Mozilla/5.0 (Linux; U; Android 2.2.1; en-gb; GT-S5570 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
RoestVrijStaal

Re: Anti-XSS protection hates Dropbox

Post by RoestVrijStaal »

My apologies for the late reply.

I updated the filter and dropbox webinterface works now.

Not sure what the true cause was that NoScript's Anti-XSS prevented me from working with dropbox.
As I read through the NoScript's changelog, I notice a lot of changes applied on the Anti-XSS component.
However it could be also an issue at dropbox's side which is fixed now.

Nevertheless, I prefer some usability and some security in a well balance, so I'll keep dropbox whitelisted.
Cloud storage was never meant to store sensitive data since there is a conflicting (privacy) laws of various countries (oh hello Patriot Act).
So in case when my dropbox account is hacked, so be it.
Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101 Firefox/20.0
RoestVrijStaal

Re: Anti-XSS protection hates Dropbox

Post by RoestVrijStaal »

Also thank you all for the help :)
Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101 Firefox/20.0
Post Reply