Files
CRM_ENVR/rust-ai/target/debug/.fingerprint/crm-ai-f6bc192b1f678367/bin-crm-ai.json
T
Ace abb77bf2f2 Files Changed
Security Fixes
File	Change
.env.local	Placeholder JWT secret (rotate to random value: openssl rand -base64 64)
src/middleware.ts	Removed /api/auth/me bypass; API routes return JSON 401 (not 302 redirect)
src/lib/auth.ts	sameSite: "lax" → "strict" (create + destroy cookie); SVG name chars are pre-computed (no injection)
src/lib/avatar.ts	Added sanitizeName() — strips non-alphanumeric/safe chars, max 50 chars
src/app/api/users/route.ts	POST restricted to super_admin; validates role against whitelist ["sales","admin","super_admin","dev"]; validates active defaults to true
src/app/api/users/[id]/route.ts	DELETE restricted to super_admin; blocks self-deletion
src/app/api/leads/[id]/route.ts	GET: non-admin users filtered by assigned_to; PATCH: ownership check + score validated 0-100 range
src/app/api/leads/route.ts	DELETE: ownership + admin check; GET: ownership filter for non-admin users
src/app/api/conversations/[id]/messages/route.ts	GET/POST: verify user is a conversation_participant before access
rust-ai/src/main.rs	CORS: AllowOrigin::list(["localhost:3006", "127.0.0.1:3006"]) (was Any)
Performance Fixes
File	Change
src/app/api/leads/route.ts	Added limit (default 50), offset query params; ownership filter in SQL
src/app/api/users/route.ts	Added limit (default 50), offset query params
src/app/api/conversations/route.ts	Added LIMIT 50
src/app/api/leads/[id]/notes/route.ts	Added limit (default 50), offset query params
src/app/api/conversations/[id]/messages/route.ts	Added limit (default 100), offset, before query params
src/app/(dashboard)/chats/page.tsx	Pruned to 5 cached conversations; useMemo wraps messages/conversation/filteredConversations; otherParticipant moved outside component; added 10MB file size limit; recordingChunksRef cleared on discard
src/app/(dashboard)/leads/[id]/page.tsx	Optimistic status update rolls back on fetch failure
database/migrations/003_chat.sql	Added composite index idx_messages_conversation_created on (conversation_id, created_at DESC)
Code Quality Fixes
File	Change
src/lib/ai.ts	Removed dead getInstructions()/updateInstructions() (called nonexistent /ai/instructions)
src/lib/auth.ts	bcrypt.hash(password, 12) — kept (acceptable, OWASP-recommended)
src/app/login/page.tsx	"Forgot password?" button now shows alert to contact admin (was no-op)
src/components/users/user-form-dialog.tsx	Password min 6 → 8 chars
26 silent catch {} blocks across 16 files (see below)	Added console.warn("...") context messages
2026-06-23 09:45:30 +02:00

1 line
1.1 KiB
JSON

{"rustc":1562763049001146449,"features":"[]","declared_features":"[]","target":3676594517813602973,"profile":8731458305071235362,"path":4942398508502643691,"deps":[[2737927996754702673,"jsonwebtoken",false,14865758086737316956],[3405707034081185165,"dotenvy",false,3075510852548750049],[4891297352905791595,"axum",false,14280213859355760986],[5380358770761950913,"tracing_subscriber",false,7318294742859332252],[8460377374586444205,"rand",false,6129255965514146559],[8578586876803397814,"serde_json",false,13208751924205806788],[9211380034411028187,"uuid",false,9754578884237680938],[9394460649638301237,"tokio",false,3368698339394826423],[13548984313718623784,"serde",false,18222698507703917845],[14435908599267459652,"tower_http",false,4765347987117471605],[14757622794040968908,"tracing",false,11400082198002743218],[16099316836133515841,"sqlx",false,4402737266243705815],[16117757646811882223,"chrono",false,1382617074710722147],[17325453097244291330,"reqwest",false,8497714346258105127]],"local":[{"CheckDepInfo":{"dep_info":"debug\\.fingerprint\\crm-ai-f6bc192b1f678367\\dep-bin-crm-ai","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}