Saturday, 15 March 2014

javascript - Local IndexedDB security (DB name uniqueness) -



javascript - Local IndexedDB security (DB name uniqueness) -

pouchdb uses indexeddb under hood. specify database name when create it; if it's not url, the docs mention it create local database using whatever backend nowadays (i.e. indexeddb, websql, or leveldb).

what can't find info uniqueness of name. if there 2 web applications create indexeddb same name, happens?

is that:

the db linked domain, need unique database names within multiple web applications (eg. games) on single domain, or the db name global, , databases must have unique names (similar how google play requires unique app namespaces)

i plan utilize in multiple games hosted on single domain, want know if should prefix domain identifier in db names don't accidentally collide other indexeddb instances other sites.

websql , indexeddb databases both linked host. foo.com , bar.com have different databases, if gave them same name. it's standard web security; same thing happens cookies , localstorage.

from cross directory attacks section:

different authors sharing 1 host name, illustration users hosting content on geocities.com, share 1 set of databases.

so apparently databases shared per-domain not per-host.

javascript html5 pouchdb

No comments:

Post a Comment