Skip to content

Harden blackd browser-facing request handling - #5039

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

JelleZijlstra merged 2 commits into
psf:mainfrom
JelleZijlstra:codex/blackd-upstream-main-redo

Conversation

@JelleZijlstra

Copy link
Copy Markdown
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
Copy Markdown
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

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