[SOLVED, INVALID] fileden not working

Ask for help about NoScript, no registration needed to post
User avatar
Lucas Malor
Senior Member
Posts: 71
Joined: Tue Nov 09, 2010 2:01 pm
Contact:

[SOLVED, INVALID] fileden not working

Post 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.
Last edited by Lucas Malor on Tue Dec 14, 2010 8:43 am, edited 2 times in total.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: fileden not working

Post 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.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
User avatar
Lucas Malor
Senior Member
Posts: 71
Joined: Tue Nov 09, 2010 2:01 pm
Contact:

Re: fileden not working

Post 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!
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: fileden not working

Post 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]
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
User avatar
Lucas Malor
Senior Member
Posts: 71
Joined: Tue Nov 09, 2010 2:01 pm
Contact:

Re: fileden not working

Post 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:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: fileden not working

Post 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.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
User avatar
Lucas Malor
Senior Member
Posts: 71
Joined: Tue Nov 09, 2010 2:01 pm
Contact:

Re: fileden not working

Post 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\/
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: fileden not working

Post 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.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
User avatar
Lucas Malor
Senior Member
Posts: 71
Joined: Tue Nov 09, 2010 2:01 pm
Contact:

Re: fileden not working

Post 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?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: fileden not working

Post by Giorgio Maone »

Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
User avatar
Lucas Malor
Senior Member
Posts: 71
Joined: Tue Nov 09, 2010 2:01 pm
Contact:

Re: fileden not working

Post 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:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Post Reply