Close medium exposure on reports, registration, uploads, and exercise HTML.
Deploy Development / deploy (push) Successful in 59s
Test Suite / pytest-backend (push) Failing after 47s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 17s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Failing after 7m48s

A superadmin can also turn off another account''s two-factor when the authenticator is lost.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-13 16:47:57 +02:00
1 parent 5ea225ec6b
commit f10c28e5cd
20 files changed
+480 -247

No files matched your search

+12 -1
View File
@@ -28,11 +28,12 @@ import os
import re
from typing import Optional
from fastapi import APIRouter, Depends, Header, HTTPException
from fastapi import APIRouter, Depends, Header, HTTPException, Request
from pydantic import BaseModel, Field, field_validator
from club_tenancy import is_platform_admin, is_superadmin
from db import get_db, get_cursor, r2d
from routers.auth import limiter
from media_legal_hold import (
LEGAL_HOLD_REASON_CODES,
assert_superadmin_for_legal_hold,
@@ -432,8 +433,17 @@ def _report_row_to_dict(row) -> dict:
# ─── Endpoints ──────────────────────────────────────────────────────────────
def _content_report_rate_marker(request: Request) -> None:
"""SlowAPI-Ziel für 10 Meldungen pro Stunde. Nicht als Route: der Decorator bricht die Annotationen."""
return None
limiter.limit("10/hour")(_content_report_rate_marker)
@router.post("/content-reports", status_code=201)
def submit_content_report(
request: Request,
body: ContentReportCreate,
x_auth_token: Optional[str] = Header(default=None),
):
@@ -446,6 +456,7 @@ def submit_content_report(
- Journaleintrag im Medien-Audit-Log (wenn target_type=media_asset)
- E-Mail-Bestaetigung an Melder + Benachrichtigung an Plattform-Admins (best-effort)
"""
limiter._check_request_limit(request, _content_report_rate_marker, False)
if not body.good_faith_confirmed:
raise HTTPException(
status_code=400,