security(deploy): nginx client_max_body_size 100M → 120M#18
Merged
Conversation
mpasternak
force-pushed
the
feat/zglos-tmp-cron-nginx-cap
branch
from
July 12, 2026 18:09
5e670eb to
856aa10
Compare
Legalny maks zgloszenia publikacji to 5 x 20 MiB = 104857600 B = DOKLADNIE 100 MiB samych plikow (walidatory app-layer MAX_ROZMIAR_PLIKU/MAX_LICZBA_PLIKOW, bpp PR #551), a dawny cap 100M (== 100 MiB) nie zostawial ani bajta na narzut multipart (granice, naglowki per-part, pola formsetu autorow, CSRF) -> najwieksze POPRAWNE zgloszenie dostawaloby 413 zanim dotrze do Django. 120M daje ~20 MiB zapasu bez istotnego oslabienia bariery (nadal > limity app-layer; rate-limit per-IP ogranicza czestotliwosc). vhost.conf.template bind-mountowany wersjonowo -> 'git pull && make up' aktywuje bez migracji. Retencja plikow tmp (wyczysc_zglos_tmp) przeniesiona do celery beat w repo bpp (lekki cyklik z rodzenstwem cleanup-*, portable z kodem) zamiast Ofelii. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mpasternak
force-pushed
the
feat/zglos-tmp-cron-nginx-cap
branch
from
July 12, 2026 18:10
856aa10 to
60a090f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kontekst
Warstwa wdrożeniowa dla naprawy anonimowego DoS przez uploady formularza zgłoszeń (bpp PR #551, na
dev).Zmiana
nginx
client_max_body_size100M → 120M (defaults/webserver/vhost.conf.template).Limity app-layer z #551: 5 plików × 20 MiB = dokładnie 100 MiB samych plików = nginx
100Mco do bajta → najbardziej poprawne maks. zgłoszenie dostawałoby 413 przed dotarciem do Django (zero zapasu na narzut multipart: boundary, nagłówki per-part, formset autorów, CSRF).120Mdaje ~20 MiB marginesu; bariera nadal > limitów app-layer. Plik bind-mountowany wersjonowo →git pull && make upaktywuje bez migracji.Testy
mkdocs build --strict: EXIT 0.tests/test_makefile.sh: 133 passed / 1 failed — fail (nginx -tLE-mode fallback) pre-existing, zweryfikowany revertem vhost doorigin/main(identyczny wynik). 4 wariantynginx -tprzeszły na zmienionym templatcie.🤖 Generated with Claude Code