Closed Bug 1102159 Opened 8 years ago Closed 6 years ago

datastore:// protocol handler


(Core :: DOM: Core & HTML, defect)

Not set





(Reporter: ferjm, Unassigned)



While working on the proposal for [1] I wondered if we ever thought about adding a datastore:// protocol handler. I believe it would provide a more web-like option for querying and managing data in a remote source. For example, we could do XHR requests to datastore:// URLs or set the src property of an iframe to a datastore:// URL containing static content (this is the use case of [1]).

Not that it really matters but Android has content:// URLs for their content providers which is their equivalent to our datastores.
Flags: needinfo?(jonas)
Blocks: 1097768
I'd be ok with this. Though doesn't seem like a high priority unless it makes gaia development significantly simpler.

I'm guessing we need to be able to address a Blob stored somewhere in an object which is stored in a DataStore. So the URL would need to specify:

* Datastore name
* ManifestURL if owning app
* Key of the entry
* Property name within the entry

All of this needs to be encoded into the URL. Not complicated to do, we just need to encode the various parts.

What we do need to think about though is if there are security implications. Like, can you trick a user to store a HTML file with inline scripts as the face picture of a user. Then trick an app to simply navigate to a datastore:// URL which points to the HTML file. Thereby XSSing the app.
Flags: needinfo?(jonas)
Closed: 6 years ago
Resolution: --- → WONTFIX
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.