Page 1 of 1

[SOLVED, INVALID] fileden not working

Posted: Wed Nov 10, 2010 11:27 am
by Lucas Malor
NoScript does not let http://www.fileden.com/browser.php to show files, even if scripts are globally allowed. Disabling NoScript all works. You must have an account with at least one file to test. Probably the cause is this:

Code: Select all

[NoScript] Blocking cross-site Javascript served from http://jqueryjs.googlecode.com/files/jquery-1.2.6.pack.js with wrong type info text/x-c, attachment; filename="jquery-1.2.6.pack.js" and included by http://www.fileden.com/browser.php
Anyway these are the other errors:

Code: Select all

Error: $(document).ready is not a function: http://www.fileden.com/templates/newtemp/browser_add.js Line: 54
Error: $(document).ready is not a function: http://www.fileden.com/templates/newtemp/browser_add.js Line: 54
Tested with NoScript 2.0.4 2.0.5rc3, Firefox 3.6.12, blank profile.

Re: fileden not working

Posted: Wed Nov 10, 2010 11:43 am
by Giorgio Maone
It's a bug in the site.
That jquery file is not meant to be included, but only to be downloaded (notice the "attachment" part).
If you want to work-around, you can add "/jquery-[\d+\.]+\.pack\.js$" (without quotes) to your noscript.inclusionTypeChecking.exceptions about:config preference, but this should really be fixed by the site administrators, by using googleapis.com instead of googlecode.com for shared scripts.

Re: fileden not working

Posted: Wed Nov 10, 2010 12:56 pm
by Lucas Malor
It seems js re doesn't work for noscript.inclusionTypeChecking.exceptions. I tried with and without "/" at the start and the end, replacing the entire value. I added " http://jqueryjs.googlecode.com/" and it works.
Anyway I signalled the problem to fileden. Thank you very much!

Re: fileden not working

Posted: Wed Nov 10, 2010 1:04 pm
by Giorgio Maone
Lucas Malor wrote:It seems js re doesn't work for noscript.inclusionTypeChecking.exceptions.
Sorry, my fault, the regexp was wrong. Should have been (corrected also in my original post):

Code: Select all

[b]/jquery-[\d+\.]+\.pack\.js$[/b]

Re: fileden not working

Posted: Wed Nov 10, 2010 2:44 pm
by Lucas Malor
It works, but now I have another doubt. I tried to write other regexps. This one works:

Code: Select all

/\/jqueryjs\.googlecode\.com\/
but this one NOT:

Code: Select all

/\/\/jqueryjs\.googlecode\.com\/
Why? :shock:

Re: fileden not working

Posted: Wed Nov 10, 2010 3:12 pm
by Giorgio Maone
Lucas Malor wrote: but this one NOT:

Code: Select all

/\/\/jqueryjs\.googlecode\.com\/
Why? :shock:
Because slashes are not special characters, since the regular expressions in NoScript's address patterns are space separated and not quoted ("/" is the default and only quote in JavaScript regexp literals).
Therefore your second expression matches 3 slashes, rather than 2.

Re: fileden not working

Posted: Wed Nov 10, 2010 3:57 pm
by Lucas Malor
Ah, sorry, I thought the slash you added was to signal the start of a re to NS. So can't I use modifiers, like global, ignore case and multiline? Only for curiosity, I don't think I'll use them for those purposes, and slash escaped by default is very convenient :).
Only another little thing (sorry, I know I'm boring :P): it's not better to use this re? It's Google after all.

Code: Select all

^[^:]+://jqueryjs\.googlecode\.com\/

Re: fileden not working

Posted: Wed Nov 10, 2010 4:11 pm
by Giorgio Maone
Lucas Malor wrote:Ah, sorry, I thought the slash you added was to signal the start of a re to NS. So can't I use modifiers, like global, ignore case and multiline? Only for curiosity, I don't think I'll use them for those purposes, and slash escaped by default is very convenient :).
Only another little thing (sorry, I know I'm boring :P): it's not better to use this re? It's Google after all.

Code: Select all

^[^:]+://jqueryjs\.googlecode\.com\/
It's better using the whole URL, actually.
Anybody can upload anything on googlecode for download (think of a security project with many malware samples).
If you allow googlecode to run and there's no type checking, is quite easy using googlecode as a JavaScript malware repository.

Re: fileden not working

Posted: Thu Nov 11, 2010 1:47 pm
by Lucas Malor
So there's another problem: I must not only set the script as allowed in noscript.inclusionTypeChecking.exceptions, but I must allow googlecode.com.
Is there a way to set a re for allowed sites, or to allow a full url?

Re: fileden not working

Posted: Thu Nov 11, 2010 1:55 pm
by Giorgio Maone

Re: fileden not working

Posted: Thu Nov 11, 2010 3:46 pm
by Lucas Malor
Giorgio Maone wrote:http://noscript.net/faq#qa8_10
Great work! :D

Thanks to your help, this is my final workaround:
  1. allow fileden.com and jqueryjs.googlecode.com
  2. add to noscript.inclusionTypeChecking.exceptions this regexp:

    Code: Select all

    ^http://jqueryjs\.googlecode\.com/files/jquery-1\.2\.6\.pack\.js$
  3. add to Abe in USER ruleset:

    Code: Select all

    Site jqueryjs.googlecode.com
    Accept from ^[^:]+://www\.fileden\.com/browser\.php(\?)?
    Deny
Thank you very much for the help and your work :)

PS: if someone knows another free file hosting site that allow direct download, PM me please. This one starts to bore me... :evil: