|
|
@ -9,18 +9,20 @@ |
|
|
|
:license: BSD, see LICENSE for more details. |
|
|
|
:license: BSD, see LICENSE for more details. |
|
|
|
""" |
|
|
|
""" |
|
|
|
|
|
|
|
|
|
|
|
import uuid |
|
|
|
|
|
|
|
import hashlib |
|
|
|
import hashlib |
|
|
|
|
|
|
|
import uuid |
|
|
|
import warnings |
|
|
|
import warnings |
|
|
|
from base64 import b64encode, b64decode |
|
|
|
from base64 import b64decode, b64encode |
|
|
|
from datetime import datetime |
|
|
|
from datetime import datetime |
|
|
|
from werkzeug.http import http_date, parse_date |
|
|
|
|
|
|
|
|
|
|
|
from itsdangerous import BadSignature, URLSafeTimedSerializer |
|
|
|
from werkzeug.datastructures import CallbackDict |
|
|
|
from werkzeug.datastructures import CallbackDict |
|
|
|
|
|
|
|
from werkzeug.http import http_date, parse_date |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from flask.helpers import patch_vary_header |
|
|
|
from . import Markup, json |
|
|
|
from . import Markup, json |
|
|
|
from ._compat import iteritems, text_type |
|
|
|
from ._compat import iteritems, text_type |
|
|
|
from .helpers import total_seconds, is_ip |
|
|
|
from .helpers import is_ip, total_seconds |
|
|
|
|
|
|
|
|
|
|
|
from itsdangerous import URLSafeTimedSerializer, BadSignature |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SessionMixin(object): |
|
|
|
class SessionMixin(object): |
|
|
@ -405,7 +407,7 @@ class SecureCookieSessionInterface(SessionInterface): |
|
|
|
|
|
|
|
|
|
|
|
# Add a "Vary: Cookie" header if the session was accessed at all. |
|
|
|
# Add a "Vary: Cookie" header if the session was accessed at all. |
|
|
|
if session.accessed: |
|
|
|
if session.accessed: |
|
|
|
response.headers.add('Vary', 'Cookie') |
|
|
|
patch_vary_header(response, 'Cookie') |
|
|
|
|
|
|
|
|
|
|
|
if not self.should_set_cookie(app, session): |
|
|
|
if not self.should_set_cookie(app, session): |
|
|
|
return |
|
|
|
return |
|
|
|