refactor: comentarii strict functionale, fara referinte PRD/stories
Curatare globala a comentariilor si docstring-urilor (app, tools, teste, scripturi): eliminate referintele la PRD-uri, US-xxx, task-uri istorice si review-uri; pastrata doar informatia functionala, formulata scurt. Regula adaugata in CLAUDE.md (sectiunea Stil). Fara modificari de cod sau comportament. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""Teste US-009 (PRD 3.3): CSRF token per-sesiune + rate-limit signup."""
|
||||
"""Teste CSRF token per-sesiune + rate-limit signup."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -23,7 +23,7 @@ def _make_csrf_app() -> FastAPI:
|
||||
|
||||
@mini.get("/login-sim")
|
||||
def login_sim(request: Request):
|
||||
"""Simuleaza login: seteaza account_id in sesiune (ca set_session din US-003)."""
|
||||
"""Simuleaza login: seteaza account_id in sesiune (ca set_session real)."""
|
||||
from app.web.csrf import get_csrf_token
|
||||
request.session["account_id"] = 1
|
||||
return {"token": get_csrf_token(request)}
|
||||
@@ -78,7 +78,7 @@ def test_verify_csrf_gresit_ridica(csrf_client):
|
||||
"""Token gresit -> CsrfError -> 403.
|
||||
|
||||
CSRF se enforce doar cand exista sesiune autentificata (account_id in sesiune).
|
||||
login-sim seteaza account_id + csrf_token, ca login-ul real din US-003.
|
||||
login-sim seteaza account_id + csrf_token, ca login-ul real.
|
||||
"""
|
||||
csrf_client.get("/login-sim") # initializeaza sesiunea autentificata (account_id + csrf_token)
|
||||
resp = csrf_client.post("/verify-csrf", data={"csrf_token": "token-fals-xxxx"})
|
||||
|
||||
Reference in New Issue
Block a user