Closed Bug 1281114 Opened 9 years ago Closed 9 years ago

Convert devtools/client/debugger/test/mochitest/addon3.xpi to use channel.open2()

Categories

(Core :: DOM: Security, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: ckerschb, Assigned: ckerschb)

References

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file)

No description provided.
Assignee: nobody → ckerschb
Blocks: 1182535
Status: NEW → ASSIGNED
Whiteboard: [domsecurity-active]
Hey Brian, when working on Bug 1279429 I realized that debugger/test/mochitest/addon3.xpi was still relying on using channel.open() instead of channel.open2(). All I have updated is the following; I replaced: > let ioservice = Cc['@mozilla.org/network/io-service;1']. > getService(Ci.nsIIOService); > let channel = ioservice.newChannel2(uri, 'UTF-8', null, null, systemPrincipal, > null, Ci.nsILoadInfo.SEC_NORMAL, > Ci.nsIContentPolicy.TYPE_OTHER); > let stream = channel.open(); with the following code: > Components.utils.import("resource://gre/modules/NetUtil.jsm"); > let channel = NetUtil.newChannel({ > uri: NetUtil.newURI(uri, 'UTF-8', null), > loadUsingSystemPrincipal: true > }); > let stream = channel.open2(); In fact, the new code does exactly the same but relies on open2() instead of open(). It will pass all security checks since the channel loads using the systemPrincipal anyway - thanks!
Attachment #8763789 - Flags: review?(bgrinstead)
Attachment #8763789 - Flags: review?(bgrinstead) → review+
Does this have a green Try run?
Flags: needinfo?(ckerschb)
Keywords: checkin-needed
(In reply to Ryan VanderMeulen [:RyanVM] from comment #2) > Does this have a green Try run? Passes locally on linux and mac, but let's make sure: https://treeherder.mozilla.org/#/jobs?repo=try&revision=db0197864810
Flags: needinfo?(ckerschb)
Here is a list of tests that uses the *.xpi we updated within this patch: * browser_dbg_addon-panels.js * browser_dbg_addon-sources.js * browser_dbg_addon-workers-dbg-enabled.js * browser_dbg_addonactor.js They all run within M(dt3) - all pass! Ready to checkin!
Keywords: checkin-needed
Pushed by kwierso@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d2a087cdfb00 Convert devtools/client/debugger/test/mochitest/addon3.xpi to use channel.open2() r=grinstead
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
When you changed this add-on did you get it resigned? It's currently causing test failures when we enforce signing.
Blocks: 1282868
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to Andy McKay [:andym] from comment #8) > When you changed this add-on did you get it resigned? It's currently causing > test failures when we enforce signing. No I didn't; sorry I was not aware of that. What do I have to do to get it right?
Flags: needinfo?(amckay)
I think we've got it in bug 1282868, if the tests pass a quick check that the addon change I've made on that bug would be cool. I'm still confused why this didn't fail as soon as it hit master though...
Flags: needinfo?(amckay)
(In reply to Andy McKay [:andym] from comment #10) > I think we've got it in bug 1282868, Awesome, thanks!
(In reply to Christoph Kerschbaumer [:ckerschb] from comment #11) > (In reply to Andy McKay [:andym] from comment #10) > > I think we've got it in bug 1282868, Andy, I suppose Bug 1282868 fixed the signing problem, right? If so, I suppose we can finally mark this bug as resolved.
Flags: needinfo?(amckay)
Sorry about the delay, yes we can close this now. Thanks.
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Flags: needinfo?(amckay)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: