From 456f4f3d0185856c2f216f4a2499f93d03425d00 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Wed, 27 Jun 2018 12:42:43 -0400 Subject: [PATCH] +1 --- CHANGELOG.md | 3 +++ lib/src/plugin.dart | 5 ++--- pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d567846..16b0fd54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 1.1.1+1 +* Update `protectCookie` to only send `maxAge` when it is not `-1`. + # 1.1.1 * Added `protectCookie`, to better protect data sent in cookies. diff --git a/lib/src/plugin.dart b/lib/src/plugin.dart index fc56d993..df689774 100644 --- a/lib/src/plugin.dart +++ b/lib/src/plugin.dart @@ -172,10 +172,9 @@ class AngelAuth { cookie.domain ??= cookieDomain; } - cookie.maxAge ??= - _jwtLifeSpan < 0 ? -1 : _jwtLifeSpan ~/ Duration.millisecondsPerSecond; - if (_jwtLifeSpan > 0) { + cookie.maxAge ??= + _jwtLifeSpan < 0 ? -1 : _jwtLifeSpan ~/ Duration.millisecondsPerSecond; cookie.expires ??= new DateTime.now().add(new Duration(milliseconds: _jwtLifeSpan)); } diff --git a/pubspec.yaml b/pubspec.yaml index 293f2d26..b513c084 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: angel_auth description: A complete authentication plugin for Angel. -version: 1.1.1 +version: 1.1.1+1 author: Tobe O homepage: https://github.com/angel-dart/angel_auth environment: