Skip to content

[pull] main from django:main#355

Merged
pull[bot] merged 10 commits intothreatcode:mainfrom
django:main
Apr 7, 2026
Merged

[pull] main from django:main#355
pull[bot] merged 10 commits intothreatcode:mainfrom
django:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 7, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

jacobtylerwalls and others added 10 commits April 7, 2026 07:12
Thanks Tarek Nakkouch for the report and Jake Howard and Natalia Bidart
for reviews.
…dmin.

Edit permissions were still checked as part of ordinary form validation,
but because GenericInlineModelAdmin overrides get_formset(), it lacked
InlineModelAdmin's dynamic DeleteProtectedModelForm.has_changed() logic
for checking permissions server-side, leaving the add case unaddressed.

This change reimplements the relevant part of InlineModelAdmin.get_formset().

Thanks N05ec@LZU-DSLab for the report, and Natalia Bidart,
Markus Holtermann, and Simon Charette for reviews.
…st_editable.

Thanks Natalia Bidart, Jake Howard, and Markus Holtermann for reviews.
When a multipart file part used `Content-Transfer-Encoding: base64` and
the non-whitespace base64 bytes did not align to a multiple of 4 within
a chunk, the parser entered a loop calling `field_stream.read(1-3)` once
per whitespace byte. Each such call fetched the entire internal buffer,
sliced off 1-3 bytes, and pushed the remainder back via unget(), doing
an O(n) memory copy per call. A 2.5 MB payload of mostly whitespace
produced CPU amplification relative to a normal upload of the same size.

The alignment loop now reads `self._chunk_size` bytes at a time, and
accumulates stripped parts in a list joined once at the end.

Thanks to Seokchan Yoon for the report and the fixing patch.
…size in ASGI requests.

The `body` property in `HttpRequest` checks DATA_UPLOAD_MAX_MEMORY_SIZE
against the declared `Content-Length` header before reading. On the ASGI
path, chunked requests carry no `Content-Length`, so the check evaluated
to 0 and always passed regardless of the actual body size.

This work adds a new check on the actual number of bytes consumed.

Thanks to Superior for the report, and to Jake Howard and Jacob Walls
for reviews.
…rge request bodies.

Notably that the limit can be bypassed under ASGI.
The artifacts downloaded from media.djangoproject.com use a lowercase
"django-" prefix but the script searched for capital D. Error was:
"ls: cannot access 'Django-*.tar.gz': No such file or directory"

The tarball and wheel smoke-tests used the same `test_one` folder inside
the same working directory, so the second invocation failed with
"CommandError: '/tmp/tmp.1234567890' already exists".
The decorator was updated to accept **kwargs and forward them to
task_class, allowing additional parameters to be passed to custom
Task subclasses.
@pull pull Bot locked and limited conversation to collaborators Apr 7, 2026
@pull pull Bot added the ⤵️ pull label Apr 7, 2026
@pull pull Bot merged commit e27f23b into threatcode:main Apr 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants