Closed
Bug 1119005
Opened 9 years ago
Closed 9 years ago
No need to branch on NewChannel callsites anymore
Categories
(Core :: DOM: Security, defect)
Core
DOM: Security
Tracking
()
RESOLVED
FIXED
mozilla38
Tracking | Status | |
---|---|---|
firefox38 | --- | fixed |
People
(Reporter: ckerschb, Assigned: ckerschb)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
1.80 KB,
patch
|
sicking
:
review+
sworkman
:
review+
|
Details | Diff | Splinter Review |
23.07 KB,
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
As Jonas pointed out: https://bugzilla.mozilla.org/show_bug.cgi?id=1110469#c3 we should investigate.
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 1•9 years ago
|
||
Jonas, I think we should rather use the nullPrincipal instead of just calling NS_NewChannelInternal(loadInfo) in case there is no loadInfo. We might end up creating a channel with no loadInfo within Gecko. I think we should try to avoid that, no? In comparison to other cases, which I am going to update soon in a different bug: http://mxr.mozilla.org/mozilla-central/source/browser/components/about/AboutRedirector.cpp#166 Basically, wherever we left that comment: > // Bug 1087720 (and Bug 1099296): > // Once all callsites have been updated to call NewChannel2() > // instead of NewChannel() we should have a non-null loadInfo > // consistently. Until then we have to branch on the loadInfo. we can then just call NS_NewChannelInternal instead of branching on the loadInfo.
Attachment #8566310 -
Flags: review?(jonas)
Comment on attachment 8566310 [details] [diff] [review] jarchannel_should_not_pass_system.patch Review of attachment 8566310 [details] [diff] [review]: ----------------------------------------------------------------- If there's no mLoadInfo then the "inner" channel also shouldn't have a loadinfo. So just remove the 'else'.
Attachment #8566310 -
Flags: review?(jonas) → review-
If we don't have a loadinfo then it's no more "correct" to just make up information than to clearly indicate that there's no loadinfo.
Assignee | ||
Updated•9 years ago
|
Summary: Investigate if nsJARChannel passes the right principal when creating a new channel → No need to branch on NewChannel callsites anymore
Assignee | ||
Comment 4•9 years ago
|
||
Since we allow channel creation without a LoadInfo, and now also allow channel redirection without a loadInfo (bug 1134196), we should finally also allow to create a new InputStreamChannel without a loadInfo.
Attachment #8566310 -
Attachment is obsolete: true
Attachment #8566685 -
Flags: review?(jonas)
Attachment #8566685 -
Flags: review?(jduell.mcbugs)
Assignee | ||
Comment 5•9 years ago
|
||
Removing the if condition before calling NewChannelInternal and NewInputStreamChannelInternal since both functions can deal with null loadInfos. Should be a rare case anyway to pass a null loadInfo, since we have update all of the callsites of newChannel within Gecko to provide the necessary arguments.
Attachment #8566688 -
Flags: review?(jonas)
Attachment #8566685 -
Flags: review?(jonas) → review+
Attachment #8566688 -
Flags: review?(jonas) → review+
Comment 6•9 years ago
|
||
Comment on attachment 8566685 [details] [diff] [review] bug_1119005_netutil_changes.patch Review of attachment 8566685 [details] [diff] [review]: ----------------------------------------------------------------- Taking Jason's review and marking r+. Looks sane enough to me.
Attachment #8566685 -
Flags: review?(jduell.mcbugs) → review+
Assignee | ||
Comment 7•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9d623faf8c8b https://hg.mozilla.org/integration/mozilla-inbound/rev/2144c24dfa01
Target Milestone: --- → mozilla38
Comment 8•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9d623faf8c8b https://hg.mozilla.org/mozilla-central/rev/2144c24dfa01
You need to log in
before you can comment on or make changes to this bug.
Description
•