Always allow a particular embedding?

Ask for help about NoScript, no registration needed to post
access2godzilla
Senior Member
Posts: 109
Joined: Sun May 20, 2012 5:09 pm

Always allow a particular embedding?

Post by access2godzilla »

I have NS to block Flash on all sites (regardless of trusted/untrusted). However, I want to allow http://www.jamendo.com/js/libs/jquery.j ... player.swf always. Is there any way to do this?
Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20130401 Firefox/21.0
User avatar
Giorgio Maone
Site Admin
Posts: 9526
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Always allow a particular embedding?

Post by Giorgio Maone »

Yes you can.
Just add to your noscript.allowedMimeRegExp about:config preference the following pattern:

Code: Select all

application/x-shockwave-flash@http://www\.jamendo\.com/js/libs/jquery\.jplayer/Jplayer.swf
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
barbaz
Senior Member
Posts: 11091
Joined: Sat Aug 03, 2013 5:45 pm

Re: Always allow a particular embedding?

Post by barbaz »

This pattern isn't working for me. In my case I want to always allow the Flash streaming player at

Code: Select all

http://www.deeplinkmusic.com/modules/mod_radioplayerjoomla-pro/muses.swf
(there are flashvars listed in the actual URL), but despite my noscript.allowedMimeRegExp being set to

Code: Select all

application/pdf application/x-shockwave-flash@http://www\.deeplinkmusic\.com/modules/mod_radioplayerjoomla-pro/muses\.swf#!flashvars#.+
it's still blocked by NS. Removing the trailing .+ and/or the reference to flashvars doesn't help. The page in question is script-forbidden. What am I doing wrong? Does this preference require a browser restart to take effect?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0 SeaMonkey/2.22
User avatar
Giorgio Maone
Site Admin
Posts: 9526
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Always allow a particular embedding?

Post by Giorgio Maone »

Could you please show me a page where this is actually embedded for me to test it? Thanks!
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
barbaz
Senior Member
Posts: 11091
Joined: Sat Aug 03, 2013 5:45 pm

Re: Always allow a particular embedding?

Post by barbaz »

http://www.deeplinkmusic.com/deeplinkradio
It should be the Flash object on the left, under Listen Live Now.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0 SeaMonkey/2.22
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Always allow a particular embedding?

Post by therube »

As a start, & to simplify things, removing the trailing / looked to work:

> application/x-shockwave-flash@http?://www\.deeplinkmusic\.com
vs
> application/x-shockwave-flash@http?://www\.deeplinkmusic\.com/
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 5.1; rv:26.0) Gecko/20100101 SeaMonkey/2.23a2
barbaz
Senior Member
Posts: 11091
Joined: Sat Aug 03, 2013 5:45 pm

Re: Always allow a particular embedding?

Post by barbaz »

therube wrote:As a start, & to simply things, removing the trailing / looked to work:

> application/x-shockwave-flash@http?://www\.deeplinkmusic\.com
vs
> application/x-shockwave-flash@http?://www\.deeplinkmusic\.com/
Thanks therube, that does work. But wouldn't that allow every Flash object coming from deeplinkmusic on any site, thus requiring an ABE rule to achieve the desired effect?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0 SeaMonkey/2.22
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Always allow a particular embedding?

Post by therube »

As a start, & to simply things
So I didn't try to go further then that.
So, if I get time... Or if you... ;-)
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 5.1; rv:26.0) Gecko/20100101 SeaMonkey/2.23a2
User avatar
Giorgio Maone
Site Admin
Posts: 9526
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Always allow a particular embedding?

Post by Giorgio Maone »

barbaz wrote: Thanks therube, that does work. But wouldn't that allow every Flash object coming from deeplinkmusic on any site, thus requiring an ABE rule to achieve the desired effect?
Sorry, my fault, I overlooked that it was a full URL.
Actually this preference works on "sites", i.e. protocol + domain (+ port) (with no trailing slash, which would constitute "path").
And yes, if you want the "desired effect" you may achieve it by intersecting this permission with a restrictive ABE rule (but you wouldn't get placeholders, in that case).
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
barbaz
Senior Member
Posts: 11091
Joined: Sat Aug 03, 2013 5:45 pm

Re: Always allow a particular embedding?

Post by barbaz »

OK, I've done some further testing. Interesting.
It seems this feature is limited to regexps matching scheme://host.dom.ain on the same site as the top-level site. This is bad because it means you can't whitelist specific objects, nor can you allow an object coming from a CDN. Also, the issue here is unrelated to the inability to allow FONTs through allowedMimeRegExp. Without further ideas, at this point I would be inclined to wait for Giorgio to sort this out.

Edit: @Giorgio: Sorry, just missed your reply. One last question: Why doesn't this feature work on objects coming from CDNs?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0 SeaMonkey/2.22
User avatar
Giorgio Maone
Site Admin
Posts: 9526
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Always allow a particular embedding?

Post by Giorgio Maone »

barbaz wrote: Edit: @Giorgio: Sorry, just missed your reply. One last question: Why doesn't this feature work on objects coming from CDNs?
Example page?
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
barbaz
Senior Member
Posts: 11091
Joined: Sat Aug 03, 2013 5:45 pm

Re: Always allow a particular embedding?

Post by barbaz »

Thanks for clearing the "site" question up.
Any Youtube video page will do (the Flash object is coming from s.ytimg.com).

Edit: Even copying/pasting the suggested pattern from http://noscript.net/features#contentblocking didn't work :|
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0 SeaMonkey/2.22
User avatar
Giorgio Maone
Site Admin
Posts: 9526
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Always allow a particular embedding?

Post by Giorgio Maone »

barbaz wrote:Thanks for clearing the "site" question up.
Any Youtube video page will do (the Flash object is coming from s.ytimg.com).

Edit: Even copying/pasting the suggested pattern from http://noscript.net/features#contentblocking didn't work :|
Mmmm,

Code: Select all

application/x-shockwave-flash@https?://[^/]+\.(?:youtube|ytimg)\.com
actually works just fine for me (of course you need to allow youtube.com because the Flash object is generated by JavaScript).
Step-by-step instructions to reproduce?
Did you try on a clean profile with just NoScript installed, with either default configuration or "Apply these restrictions to whitelisted sites" embedding option?

[Edit]
even just

Code: Select all

application/x-shockwave-flash@https?://s\.ytimg\.com
works for me ?:/
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
barbaz
Senior Member
Posts: 11091
Joined: Sat Aug 03, 2013 5:45 pm

Re: Always allow a particular embedding?

Post by barbaz »

After some testing, it looks like marking ytimg.com as Untrusted was enough to prevent

Code: Select all

application/x-shockwave-flash@https?://s\.ytimg\.com
from working. Is this intended behavior?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0 SeaMonkey/2.22.1
User avatar
Giorgio Maone
Site Admin
Posts: 9526
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Always allow a particular embedding?

Post by Giorgio Maone »

barbaz wrote:After some testing, it looks like marking ytimg.com as Untrusted was enough to prevent

Code: Select all

application/x-shockwave-flash@https?://s\.ytimg\.com
from working. Is this intended behavior?
Absolutely, it is.
NoScript Options|Embeddings|Block every object coming from a site marked as untrusted.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
Post Reply