Skip to content

Commit

Permalink
ImmortalDB v1.1.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
gruns committed Aug 20, 2020
1 parent fa64984 commit 1478d40
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
12 changes: 11 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
================================================================================
v1.1.0
================================================================================
Fixed: Cross-origin cookies are now stored with SameSite=None,
Secure=true, as required. Other cookies remain set with SameSite=Lax
and Secure=false -- the same defaults as if SameSite and Secure
remained unset. Huge thank you to @zproxyz.
Fixed: Only add IndexedDbStore and LocalStorageStore if accessible.
Added: Cross-origin and same-origin tests.

================================================================================
v1.0.3
================================================================================
Expand All @@ -10,4 +20,4 @@ Changed: For distribution, the main exported module in package.json is
Donovan Edye.


This changelog wasn't maintained prior to v1.0.2.
This changelog wasn't maintained prior to v1.0.3.
10 changes: 8 additions & 2 deletions dist/immortal-db.js
Original file line number Diff line number Diff line change
Expand Up @@ -5115,12 +5115,18 @@ var DEFAULT_COOKIE_TTL = 365; // Days.
// https://tools.ietf.org/html/draft-west-cookie-incrementalism-00 for
// details on SameSite and cross-origin behavior.

var CROSS_ORIGIN_IFRAME = amICrossOriginIframe();
var CROSS_ORIGIN_IFRAME = amIInsideACrossOriginIframe();
var DEFAULT_SECURE = CROSS_ORIGIN_IFRAME ? true : false;
var DEFAULT_SAMESITE = CROSS_ORIGIN_IFRAME ? 'None' : 'Lax';

function amICrossOriginIframe() {
function amIInsideACrossOriginIframe() {
try {
// Raises ReferenceError if window isn't defined, eg if executed
// outside a browser.
//
// If inside a cross-origin iframe, raises: Uncaught
// DOMException: Blocked a frame with origin "..." from
// accessing a cross-origin frame.
return !Boolean(window.top.location.href);
} catch (err) {
return true;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "immortal-db",
"private": false,
"version": "1.0.3",
"version": "1.1.0",
"main": "dist/immortal-db.js",
"module": "src/index.js",
"types": "immortal-db.d.ts",
Expand Down

0 comments on commit 1478d40

Please sign in to comment.