Opened 8 years ago

Closed 8 years ago

#26499 closed Bug (worksforme)

AuthenticationMiddleware apparently accesses request.POST

Reported by: Christopher Brix Owned by: nobody
Component: contrib.auth Version: 1.9
Severity: Normal Keywords: middleware
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Christopher Brix)

The middleware AuthenticationMiddleware apparently accesses request.POST, because if I include it I get the exception You cannot access body after reading from request's data stream once I try to read request.body.
Everything works fine if I remove it from the list of middlewares.

I wasn't able to find the source code of AuthenticationMiddleware, but if it indeed does so, this should be considered a bug.

I'm running Python 2 and the latest version of Django.

Change History (2)

comment:1 Changed 8 years ago by Christopher Brix

Description: modified (diff)

comment:2 Changed 8 years ago by Tim Graham

Component: Uncategorizedcontrib.auth
Resolution: worksforme
Status: newclosed

I don't believe it does. Here's the source:

Please include complete steps to reproduce the issue when reporting a bug. Thanks.

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