Skip to content

Harden blackd browser-facing request handling#5039

Merged
JelleZijlstra merged 2 commits intopsf:mainfrom
JelleZijlstra:codex/blackd-upstream-main-redo
Mar 12, 2026
Merged

Harden blackd browser-facing request handling#5039
JelleZijlstra merged 2 commits intopsf:mainfrom
JelleZijlstra:codex/blackd-upstream-main-redo

Conversation

@JelleZijlstra
Copy link
Collaborator

Summary

  • reject browser-originated requests by default unless explicitly allowlisted
  • enforce blackd request body limits via aiohttp and gate executor submissions before they enter the process pool
  • document the new blackd options and add regression coverage for CORS, body limits, and executor backpressure

Testing

  • ./.venv/bin/python -m pytest tests/test_blackd.py

@github-actions
Copy link
Contributor

diff-shades results comparing this PR (cd50556) to main (0dae20b):

--preview style: no changes

--stable style: no changes


What is this? | Workflow run | diff-shades documentation

@JelleZijlstra JelleZijlstra merged commit 69973fd into psf:main Mar 12, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant