Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#16987 closed Bug (fixed)

Improve failure message for test_invalid_session_key

Reported by: justin@… Owned by: jMyles
Component: contrib.sessions Version: 1.3
Severity: Normal Keywords: tests, sessions
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

contrib.sessions.tests.SessionTestsMixin.test_invalid_key raises AttributeError if middleware has written an item to the cache which uses an integer for the key.

Ticket author found that djangobb (a packaged django forum app which ticket author has no affiliation) uses this technique.

Conventional session cache keys, for security as well as readability, need to use namespaces.

Attachments (1)

better_invalid_session_key_testfail (674 bytes ) - added by jMyles 13 years ago.
Patch developed at DiscSpace - this patch would have saved half a day's work.

Download all attachments as: .zip

Change History (3)

by jMyles, 13 years ago

Patch developed at DiscSpace - this patch would have saved half a day's work.

comment:1 by Paul McMillan, 13 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Paul McMillan, 13 years ago

Resolution: fixed
Status: newclosed

In [16926]:

Fixed #16987 -- Improved error message for session tests. Thanks jMyles and DiskSpace for the patch.

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