Re: [Django] #37079: RemoteUserMiddleware assumes all ASGI requests will be handled by its async path

9 views
Skip to first unread message

Django

unread,
May 4, 2026, 8:31:26 AMMay 4
to django-...@googlegroups.com
#37079: RemoteUserMiddleware assumes all ASGI requests will be handled by its async
path
------------------------------+---------------------------------------
Reporter: Jacob Walls | Owner: Jacob Walls
Type: Bug | Status: assigned
Component: contrib.auth | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+---------------------------------------
Changes (by Sarah Boyce):

* stage: Unreviewed => Accepted

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

Django

unread,
May 4, 2026, 11:53:06 AMMay 4
to django-...@googlegroups.com
#37079: RemoteUserMiddleware assumes all ASGI requests will be handled by its async
path
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: Bug | Status: assigned
Component: contrib.auth | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/37079#comment:4>

Django

unread,
May 4, 2026, 1:58:59 PMMay 4
to django-...@googlegroups.com
#37079: RemoteUserMiddleware assumes all ASGI requests will be handled by its async
path
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: Bug | Status: closed
Component: contrib.auth | Version: 5.2
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):

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

Comment:

In [changeset:"0147222691db284f87c8c2a64ac6b1eded034c49" 0147222]:
{{{#!CommitTicketReference repository=""
revision="0147222691db284f87c8c2a64ac6b1eded034c49"
Fixed #37079 -- Fixed specialization of header lookups in
RemoteUserMiddleware.

We need to switch on whether the request is a WSGI or ASGI request to
know whether to prepend `HTTP_`: we cannot assume sync exceution means
we are running under WSGI, as there could be other sync middleware
forcing sync execution under ASGI.

Thanks Mykhailo Havelia for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37079#comment:5>
Reply all
Reply to author
Forward
0 new messages