gendesign/tradein-mvp/backend
lekss361 bf55b4b80e fix(tradein): extend IDOR guard to all estimate_id routes (#690 review)
Ревью PR #702: #690 закрыл только GET /estimate/{id} + /pdf, но IDOR того же
класса оставался в 10 derived-роутах. Критично — photo-эндпоинты отдают сырые
байты фото интерьера квартиры, enumerable по UUID оценки.

Добавлен _assert_estimate_access_by_id() (тянет created_by по estimate_id →
_assert_estimate_access). Guard навешан на: GET/POST /photos,
/photos/{photo_id} (write+read PII), /houses, /placement-history,
/house-analytics, /cian-price-changes, /sell-time-sensitivity, /imv-benchmark.
upload_photo: existence SELECT 1 → SELECT created_by (без лишнего запроса).

Тесты: photo owner/other/admin/no-header (200/404/200/401), list_photos,
upload write-side 404, derived-роут houses+imv, + закрыты gap'ы ревью
(legacy NULL created_by → 404, unknown-user → 403 на /pdf). 27 passed.
2026-05-30 11:47:47 +03:00
..
app fix(tradein): extend IDOR guard to all estimate_id routes (#690 review) 2026-05-30 11:47:47 +03:00
data/sql feat(tradein): white-label branded page for client «Практика» (#657) (#672) 2026-05-29 16:09:23 +00:00
scripts feat(backtest): per-rooms asking→sold correction block (#648 S1) (#650) 2026-05-29 13:11:55 +00:00
tests fix(tradein): extend IDOR guard to all estimate_id routes (#690 review) 2026-05-30 11:47:47 +03:00
.dockerignore feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
Dockerfile feat(tradein): persistent infra для backfill scripts (PR F) (#592) 2026-05-27 06:59:54 +00:00
pyproject.toml feat(rbac): role-based access control via X-Authenticated-User middleware (#585) 2026-05-26 06:18:40 +00:00