Projet

Général

Profil

0001-middleware-set-a-variable-value-in-the-A2_OPENED_SES.patch

Benjamin Dauvergne, 28 juin 2022 22:50

Télécharger (1,06 ko)

Voir les différences:

Subject: [PATCH] middleware: set a variable value in the A2_OPENED_SESSION
 cookie

 src/authentic2/middleware.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/authentic2/middleware.py
15 15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16

  
17 17
import time
18
import uuid
18 19

  
19 20
try:
20 21
    import threading
......
71 72
        if enabled and hasattr(request, 'user') and request.user.is_authenticated:
72 73
            response.set_cookie(
73 74
                name,
74
                value='1',
75
                value=uuid.uuid4().hex,
75 76
                max_age=None,
76 77
                domain=domain,
77 78
                secure=app_settings.A2_OPENED_SESSION_COOKIE_SECURE,
78
-