All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m20s
Translation quality & format preservation: - Word: merge adjacent same-format runs into one unit (sentence-level coherence like inline-tag handling); translate comments/balloons; dedupe textbox collection (was translated twice); RTL no longer overrides center/justify alignment; CJK/Arabic font hints (eastAsia/cs) - PPTX: chart translations now actually reach the output file (ChartPart.blob is read-only — rewrite chart XML in the saved ZIP); CJK typeface hints (a:ea) - Excel: sheet renames no longer break references — rewrite cell formulas (3D/quoted), defined names, data validations, cond. formats - PDF: bold/italic honored (hebo/heit/hebi); table cells never merge; unchanged blocks left untouched (typography preserved, fixes duplicate hyperlinks); attempted/changed stats + route gate now cover PDF; CJK font paths; scanned PDFs via Mistral OCR (detection + admin settings) Features: - formality param (formal/informal) + automatic regional-variant prompts - output_mode=bilingual docx (source above translation) - per-user translation memory on Redis (falls back to LRU), context-hashed - QA report + 0-100 confidence score in job status; L0 on by default - OpenAI-compatible providers: whole chunk in ONE numbered-JSON request (~15x fewer calls) with per-item fallback; base prompt always present (custom prompt no longer replaces translation instructions) Infra & marketing alignment: - plan-based engine gating + vision gating (closes paid-engine leak); /providers/available filtered per plan; 107 languages exposed - zh-CN/zh-TW validation fixed; libmagic disabled on Windows (native crash) - admin: Mistral OCR settings + engine status dashboard; httpx<0.28 pin (TestClient breakage); Prometheus test fixture fixed - marketing docs aligned with code (PDF+OCR, retention, engines, pricing) - security: .env.ionos/.env.production/provider_settings.json removed Tests: 1173 passed / 0 failed (6 network tests deselected: free Google endpoint temporarily blocked from this machine)
1.9 KiB
1.9 KiB
status, created, title
| status | created | title |
|---|---|---|
| done | 2026-08-26 | Correctifs sécurité critique C1–C4 |
Spec : Correctifs sécurité C1–C4
Contexte
Audit de sécurité du 2026-08-26 (rapport). Correction des 4 constats critiques.
Tâches
- C1 — Secrets suivis par git :
git rm --cachedsur.env.production,.env.ionos,data/provider_settings.json,translations.db; compléter.gitignore. (Rotation des secrets + purge d'historique = action manuelle utilisateur, hors scope code.) - C2 — Path traversal URL : dans
routes/translate_routes.py::download_from_url, assainir le filename issu deContent-Disposition/URL (Path().name, contrôle-chars, length cap, fallbackdownloaded_file). - C3 — SSRF par redirection : remplacer
follow_redirects=Truepar une boucle manuelle (≤5 hops) qui revalide schéma +_is_ssrf_risk()à chaque hop. - C4 — Cleanup destructeur : dans
middleware/cleanup.py::cleanup, lire toutes les clés de chemin (input_path,file_path,output_path) et n'appliquer la suppression orpheline qu'au-delà d'un âge plancher (orphan_grace_seconds, défaut 900 s).
Critères d'acceptation
- AC1 : Étant donné un
Content-Disposition: filename="../../evil.xlsx", quanddownload_from_urls'exécute, alors le fichier est écrit dansUPLOAD_DIRavec un nom sans traversée. - AC2 : Étant donné une URL publique qui redirige (302) vers
http://169.254.169.254/, quanddownload_from_urls'exécute, alors une erreurssrf_blockedest levée. - AC3 : Étant donné un fichier récent (< 15 min) non tracé dans Redis, quand
cleanup()s'exécute, alors le fichier n'est PAS supprimé ; au-delà du plancher il l'est. - AC4 :
git ls-filesne contient plus.env.production,.env.ionos,translations.db,data/provider_settings.json.
Tests
- Tests unitaires pour le filename sanitizer, la boucle de redirection, et la logique orpheline du cleanup.