[Django] #22362: Authentication Middleware assertion message is only partially correct

1 view
Skip to first unread message

Django

unread,
Mar 31, 2014, 6:44:48 AM3/31/14
to django-...@googlegroups.com
#22362: Authentication Middleware assertion message is only partially correct
-----------------------------------------+--------------------
Reporter: Keryn Knight <django@…> | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------------+--------------------
Currently, the
[https://github.com/django/django/blob/5d263dee304fdaf95e18d2f0619d6925984a7f02/django/contrib/auth/middleware.py#L16
middleware says] ''The Django authentication middleware requires session
middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert
'django.contrib.sessions.middleware.SessionMiddleware'.'' which is true,
but doesn't expound the need for the session middleware to be '''before'''
the auth middleware, because it acts on the ''request''.

eg:
{{{
MIDDLEWARE_CLASSES = (
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
)
}}}
would fail the assertion, where
{{{
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)
}}}
would pass.

--
Ticket URL: <https://code.djangoproject.com/ticket/22362>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 31, 2014, 8:12:19 AM3/31/14
to django-...@googlegroups.com
#22362: Authentication Middleware assertion message is only partially correct
-------------------------------------+----------------------------

Reporter: Keryn Knight <django@…> | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: contrib.auth | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+----------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"246face20984b70b93751d144760bfd9b45d2c09"]:
{{{
#!CommitTicketReference repository=""
revision="246face20984b70b93751d144760bfd9b45d2c09"
Fixed #22362 -- Improved AuthenticationMiddleware assertion message.

Thanks Keryn Knight.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22362#comment:1>

Django

unread,
Mar 31, 2014, 8:12:37 AM3/31/14
to django-...@googlegroups.com
#22362: Authentication Middleware assertion message is only partially correct
-------------------------------------+----------------------------

Reporter: Keryn Knight <django@…> | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: contrib.auth | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+----------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"ef3734693277242e98996f591d9acf39e8819441"]:
{{{
#!CommitTicketReference repository=""
revision="ef3734693277242e98996f591d9acf39e8819441"
[1.7.x] Fixed #22362 -- Improved AuthenticationMiddleware assertion
message.

Thanks Keryn Knight.

Backport of 246face209 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22362#comment:2>

Reply all
Reply to author
Forward
0 new messages