From e42dc96b59ed8b4f83dbf6b4d83a35da9c10990b Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Sat, 3 Oct 2020 00:19:49 +0200 Subject: [PATCH 1/3] misc: coding style --- src/authentic2/middleware.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/authentic2/middleware.py b/src/authentic2/middleware.py index 67638cd6..663f532b 100644 --- a/src/authentic2/middleware.py +++ b/src/authentic2/middleware.py @@ -14,19 +14,15 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import random -import struct import time try: import threading except ImportError: threading = None -from binascii import hexlify from django.conf import settings from django.contrib import messages from django.utils.deprecation import MiddlewareMixin -from django.utils.encoding import force_text from django.utils.functional import SimpleLazyObject from django.utils.translation import ugettext as _ from django.utils.six.moves.urllib import parse as urlparse @@ -65,7 +61,7 @@ class OpenedSessionCookieMiddleware(MiddlewareMixin): domain = app_settings.A2_OPENED_SESSION_COOKIE_DOMAIN if hasattr(request, 'user') and request.user.is_authenticated: response.set_cookie(name, value='1', max_age=None, domain=domain, - secure=app_settings.A2_OPENED_SESSION_COOKIE_SECURE) + secure=app_settings.A2_OPENED_SESSION_COOKIE_SECURE) elif app_settings.A2_OPENED_SESSION_COOKIE_NAME in request.COOKIES: response.delete_cookie(name, domain=domain) return response -- 2.28.0