Skip to content

Commit 613c5c0

Browse files
allen-cookvimalloc
authored andcommitted
Update max age to still be before 2038 (one year) (#244)
1 parent fdfddda commit 613c5c0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

flask_jwt_extended/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ def _private_key(self):
276276
def cookie_max_age(self):
277277
# Returns the appropiate value for max_age for flask set_cookies. If
278278
# session cookie is true, return None, otherwise return a number of
279-
# seconds a long ways in the future
280-
return None if self.session_cookie else 2147483647 # 2^31
279+
# seconds 1 year in the future
280+
return None if self.session_cookie else 31540000 # 1 year
281281

282282
@property
283283
def identity_claim_key(self):

tests/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class CustomJSONEncoder(JSONEncoder):
162162
assert config.blacklist_access_tokens is False
163163
assert config.blacklist_refresh_tokens is True
164164

165-
assert config.cookie_max_age == 2147483647
165+
assert config.cookie_max_age == 31540000
166166

167167
assert config.identity_claim_key == 'foo'
168168
assert config.user_claims_key == 'bar'

0 commit comments

Comments
 (0)