Commit Graph

5 Commits

Author SHA1 Message Date
End3r 8cce8e6c2e security: add CSRF protection, input sanitization, security logging, and JWT expiry reduction 2026-04-12 18:43:39 -05:00
3nd3r cdfbb666b9 Fix #5: Fix broken E2E encryption for user-to-user PMs
- User-to-user PMs now use a server-derived shared room key (HMAC-SHA256)
  instead of each user's personal PBKDF2 key (which differed per user,
  making cross-user decryption impossible)
- Server sends room_key in pm_ready, pm_invite, and pm/history responses
- crypto.js: add importKeyBase64() for importing server-provided keys
- chat.js: use sharedKey for encrypt/decrypt in user-to-user PMs
- Violet AI transit encryption still uses personal key (unchanged)
- PM history decryption now handles errors gracefully per-message
- Encodes otherUser in history URL to prevent injection
2026-04-12 12:54:09 -05:00
3nd3r be3503b31b Fix #3: Remove client-exploitable payment endpoint
- Payment endpoint no longer uses @_require_auth (not client-callable)
- Identifies user from webhook payload user_id instead of client JWT
- Removed hardcoded payment secret from chat.js
- Client now shows placeholder message directing to admin
- Webhook secret + user_id must come from payment provider server
2026-04-12 12:51:31 -05:00
3nd3r 99859f009f Fix #1+#8: Extract shared config module, unify JWT secret
- Create config.py with shared constants, AES-GCM helpers, and JWT helpers
- app.py and routes.py now import from the single source of truth
- Eliminates JWT secret mismatch (routes.py had hardcoded default)
- Removes all duplicate _issue_jwt, _verify_jwt, _aesgcm_encrypt,
  _aesgcm_decrypt definitions
- start.py also uses shared config loader
2026-04-12 12:49:44 -05:00
ComputerTech ad510c57e1 Initial commit: SexyChat (Aphrodite) v1.0 2026-04-12 17:55:40 +01:00