From a9420afb277cecba6de79b3966c14de196bcd940 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 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/authentic2/middleware.py b/src/authentic2/middleware.py index f3b32aa0..296b05c7 100644 --- a/src/authentic2/middleware.py +++ b/src/authentic2/middleware.py @@ -14,22 +14,17 @@ # 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.translation import ugettext as _ from django.utils.six.moves.urllib import parse as urlparse -from django.shortcuts import render from . import app_settings, utils, plugins from .utils.service import get_service_from_request @@ -64,7 +59,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