Page 1 of 1
youtube iframe embedding from non whitelisted not working
Posted: Thu Nov 18, 2010 2:56 pm
by al_9x
http://apiblog.youtube.com/2010/07/new- ... ideos.html
Fx 3.6.12, NS 2.0.6rc2, new profile, forbid iframes, apply to trusted, allow (youtube.com, ytimg.com)
load the following as non whitelisted:
Code: Select all
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/JW5meKfy3fY" frameborder="0"></iframe>
after activating the iframe, the embed placeholder should appear, it doesn't
Re: youtube iframe embedding from non whitelisted not workin
Posted: Wed Dec 08, 2010 10:29 pm
by Giorgio Maone
I suppose you forgot to mention
noscript.forbidIFrameContext=2.
Either way, I can't reproduce on
latest development build 2.0.8rc3.
Re: youtube iframe embedding from non whitelisted not workin
Posted: Thu Dec 09, 2010 12:05 am
by al_9x
Giorgio Maone wrote:I suppose you forgot to mention noscript.forbidIFrameContext=2.
no, it's at default
- Start with a new profile (Fx 3.6.12, NS 2.0.8rc3)
- forbid iframe, apply to trusted
- allow youtube.com, ytimg.com
- load the following page locally (JS not allowed):
Code: Select all
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/JW5meKfy3fY" frameborder="0"></iframe>
- you'll get the iframe placeholder, activate it, the iframe loads
- now there should be a flash placeholder, it's not there
as the iframe loads the following is logged:
Code: Select all
[NoScript] Content BLOCKED JavaScript/Data URL -- type: 7, location: javascript:window.__defineGetter__("top",%20(Window.prototype%20||%20window).__lookupGetter__("top")), origin: file:///C:/test.htm, ctx: <HTML Element>, mime: , null
[NoScript] Content BLOCKED Content (Fatal Error, [Exception... "Component returned failure code: 0x805e000a [nsIDOMLocation.href]" nsresult: "0x805e000a (<unknown>)" location: "JS frame :: chrome://noscript/content/Policy.js :: anonymous :: line 572" data: no] - undefined) -- type: 5, location: http://s.ytimg.com/yt/swf/watch_as3-vflofTU0v.swf, origin: http://www.youtube.com/embed/JW5meKfy3fY, ctx: <HTML Element>, mime: application/x-shockwave-flash, null
Policy.js
Code: Select all
if (/\binnerHTML\b/.test(new Error().stack)) {
if (this._bug453825) {
572-> aContext.ownerDocument.location.href = 'javascript:window.__defineGetter__("top", (Window.prototype || window).__lookupGetter__("top"))';
if (this.consoleDump) this.dump("Locked window.top (bug 453825 work-around)");
}
if (this._bug472495) {
aContext.ownerDocument.defaultView.addEventListener("DOMNodeRemoved", this._domNodeRemoved, true);
if (this.consoleDump) this.dump("Added DOMNodeRemoved (bug 472495 work-around)");
}
}
Re: youtube iframe embedding from non whitelisted not workin
Posted: Thu Dec 09, 2010 12:17 am
by Giorgio Maone
Sorry, my fault. You said "as non whitelisted", but I assumed your proposed test page was the link you gave me, which was obviously whitelisted if youtube.com needed to be allowed.
This looks like some strange Firefox bug, though, which I can only work around.
Re: youtube iframe embedding from non whitelisted not workin
Posted: Thu Dec 09, 2010 12:46 am
by Giorgio Maone
Re: youtube iframe embedding from non whitelisted not workin
Posted: Thu Dec 09, 2010 12:58 am
by al_9x