Closed
Bug 776797
Opened 12 years ago
Closed 12 years ago
Lock down POfflineCacheUpdate
Categories
(Core :: Networking: Cache, defect)
Core
Networking: Cache
Tracking
()
People
(Reporter: cjones, Assigned: mayhemer)
References
Details
(Whiteboard: [WebAPI:P2][LOE:S])
Attachments
(1 file)
(deleted),
patch
|
jduell.mcbugs
:
review+
mayhemer
:
checkin+
|
Details | Diff | Splinter Review |
Right now we trust the data in the request, but we should only allow updating resources owned by the current origin loaded in the PBrowser.
Assignee | ||
Comment 1•12 years ago
|
||
Can you please be more specific?
Updated•12 years ago
|
blocking-basecamp: --- → +
Updated•12 years ago
|
blocking-basecamp: + → ?
Whiteboard: [blocked-on-input]
Comment 2•12 years ago
|
||
I forget why we're blocked on input here. Can anyone enlighten me?
Comment 3•12 years ago
|
||
Needs jduell's analysis to determine if there's work here or not.
Assignee: nobody → jduell.mcbugs
blocking-basecamp: ? → +
Whiteboard: [blocked-on-input]
Updated•12 years ago
|
Whiteboard: [WebAPI:P2]
Comment 4•12 years ago
|
||
Ping?
Comment 5•12 years ago
|
||
From talking to Honza, this appears to be just a matter of checking here
http://mxr.mozilla.org/mozilla-central/source/dom/ipc/TabParent.cpp#1046
that both the aManifestURI, aDocumentURI are from the origin the app is from (using the app info we can get from the TabParent itself) and that the app has permission to use the offline cache.
Assignee: jduell.mcbugs → honzab.moz
Whiteboard: [WebAPI:P2] → [WebAPI:P2][LOE:S]
Assignee | ||
Comment 6•12 years ago
|
||
Just to confirm and repeat:
- check the documentURI and the manifestURI are the same origin
- check that for domain of the manifestURI we allow offline caching (nsOfflineCacheUpdateService::OfflineAppAllowedForURI(aManifestURI))
This will not break anything, since manifest URI must always be the same origin as the document URI we originally do the permission check for in nsDocShell::LoadURI (or one of its internal methods).
Status: NEW → ASSIGNED
Assignee | ||
Comment 7•12 years ago
|
||
Attachment #665099 -
Flags: review?(jduell.mcbugs)
Comment 8•12 years ago
|
||
Comment on attachment 665099 [details] [diff] [review]
v1
Review of attachment 665099 [details] [diff] [review]:
-----------------------------------------------------------------
::: uriloader/prefetch/OfflineCacheUpdateChild.cpp
@@ +54,5 @@
> // OfflineCacheUpdateChild::nsISupports
> //-----------------------------------------------------------------------------
>
> NS_INTERFACE_MAP_BEGIN(OfflineCacheUpdateChild)
> + NS_INTERFACE_MAP_ENTRY(nsISupports)
I assume this is an unrelated fix? Why do you need an entry for nsISupports? (nsHttpChannel, for instance, doesn't have it in its map)
Attachment #665099 -
Flags: review?(jduell.mcbugs) → review+
Assignee | ||
Comment 9•12 years ago
|
||
(In reply to Jason Duell (:jduell) from comment #8)
> > + NS_INTERFACE_MAP_ENTRY(nsISupports)
>
> I assume this is an unrelated fix? Why do you need an entry for
> nsISupports? (nsHttpChannel, for instance, doesn't have it in its map)
Thanks for r. This is needed, otherwise QI asserts here [1] when invoked from some IPC code. I think there is always a need for nsISupports.
According nsHttpChannel: it inherits it from HttpBaseChannel ;)
[1] http://hg.mozilla.org/mozilla-central/annotate/aacf4867f830/xpcom/glue/nsISupportsImpl.h#l690
Comment 10•12 years ago
|
||
This should probably never have had the feature keyword. Sorry for the noise.
Keywords: feature
Assignee | ||
Comment 11•12 years ago
|
||
Comment on attachment 665099 [details] [diff] [review]
v1
https://hg.mozilla.org/integration/mozilla-inbound/rev/42200a47baea
(https://tbpl.mozilla.org/?tree=Try&rev=e98c3a832362)
Attachment #665099 -
Flags: checkin+
Comment 12•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in
before you can comment on or make changes to this bug.
Description
•