Opened 10 years ago

Closed 10 years ago

#1048 closed defect (fixed)

[patch] AttributeError when SESSION_SAVE_EVERY_REQUEST is True and no cookie has been set yet.

Reported by: Jiri Barton <jbar@…> Owned by: adrian
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

[1303] introduced SESSION_SAVE_EVERY_REQUEST. The code in source:django/trunk/django/middleware/sessions.py does not handle the situation when

  • there is no cookie in the browser yet (or no sessionid for the host), and
  • SESSION_SAVE_EVERY_REQUEST is True.

The reason it has failed to catch someone's attention may be that browsers are often set to keep the cookies. This error reappeared with the name of the default cookies changed in [1584].

Attachments (1)

middleware-sessions_r1303.diff (1.6 KB) - added by Jiri Barton <jbar@…> 10 years ago.

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by Jiri Barton <jbar@…>

comment:1 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [1978]) Fixed #1048 -- Fixed AttributeError in sessions framework when SESSION_SAVE_EVERY_REQUEST is True and no cookie has been set yet. Thanks, Jiri Barton

Note: See TracTickets for help on using tickets.
Back to Top