summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2026-05-01 12:20:28 -0400
committerJacob Walls <jacobtylerwalls@gmail.com>2026-05-06 10:42:15 -0400
commit1085e5e17b7403b15c4eff397f3c98c15660f46d (patch)
tree1617a2efc9162ecf16e70d488686316ddd2252ae /docs
parent75bb46cc454fdef0585f0a460f36f579b59f0356 (diff)
Fixed #36300 -- Restored the semantic where RemoteUserMiddleware.header corresponds to request.META under ASGI.
Because these tests always passed both WSGI environ values and HTTP headers via `**extra`, this masked a behavior difference between WSGI and ASGI. What should happen: everything should be passed via `headers` but for the default REMOTE_USER case on WSGI, which should be passed via `**extra`. Since that was not done, a regression made it into Django 5.2 (50f89ae850f6b4e35819fe725a08c7e579bfd099) where `.header` no longer corresponded to the request.META key under ASGI. To cope, an ASGI user would have started(*) sending HTTP headers that match the `.header` attribute, which may or may not have been edited to remove the HTTP_ prefix. (Note: the default `REMOTE_USER` case did not work under ASGI, so the change in Django 5.2 had the effect of fixing the default case but changing the semantic of the custom case.) (*): Unless they were getting the sync execution path, which didn't have this bug. See the fix in 0f4fff79d33b7cc84822e66bd1fc16caf8222e3a. Thanks Mykhailo Havelia and Sarah Boyce for reviews.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/6.1.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/releases/6.1.txt b/docs/releases/6.1.txt
index 7af3c6af72..50e4f63f5e 100644
--- a/docs/releases/6.1.txt
+++ b/docs/releases/6.1.txt
@@ -467,6 +467,15 @@ backends.
* The undocumented ``InclusionAdminNode.__init__()`` now takes the template tag
``name`` as the first positional argument.
+:mod:`django.contrib.auth`
+--------------------------
+
+* Under ASGI, :class:`~django.contrib.auth.middleware.RemoteUserMiddleware` no
+ longer prefixes ``HTTP_`` when looking up custom values in ``request.META``.
+ For example, to send ``-H "AuthUser": ...``, the ``header`` attribute should
+ be ``HTTP_AUTHUSER``. This restores the behavior prior to Django 5.2. (The
+ default value of ``REMOTE_USER`` is not affected.)
+
:mod:`django.contrib.gis`
-------------------------