Commit Graph

11 Commits

Author SHA1 Message Date
Estrella Pan
b57d3c49ae feat(security): add security config UI and improve auth/MCP security
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 17:19:14 +01:00
Estrella Pan
c7c709fa66 fix(security): harden auth, JWT, WebAuthn, and API endpoints
- Persist JWT secret to config/.jwt_secret (survives restarts)
- Change active_user from list to dict with timestamps
- Extract username from cookie token instead of list index
- Add SSRF protection (_validate_url) for setup test endpoints
- Mask sensitive config fields (password, api_key, token, secret)
- Add auth guards to notification test endpoints
- Fix path traversal in /posters endpoint using resolved path check
- Add CORS middleware with empty allow_origins
- WebAuthn: add challenge TTL (300s), max capacity (100), cleanup
- Remove hardcoded default password from User model
- Use timezone-aware datetime in passkey models
- Adapt unit tests for active_user dict and cookie-based auth

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 11:46:12 +01:00
EstrellaXD
ebd58531b5 fix(test): add missing DEV_AUTH_BYPASS constant for test mocking
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:06:13 +01:00
100gle
3ead13f4b0 chore(format): fix the ruff checking issue 2023-10-02 13:16:31 +08:00
EstrellaXD
f2d87f346e fix: login failed message. 2023-09-19 14:14:51 +08:00
EstrellaXD
d6b36e5225 change:
- add random pwd_key.
- backend auth change from Auth token to cookies
2023-09-06 21:19:59 +08:00
EstrellaXD
ba7c9f6c69 chore: add response func in api module. 2023-08-08 19:16:57 +08:00
EstrellaXD
69a4daca0c chore: small change in api. 2023-08-08 14:12:19 +08:00
EstrellaXD
1c4e8dc293 fix: old data support problem. 2023-08-07 20:14:45 +08:00
estrella
d24acc60d5 fix: Userdatabase bugs 2023-07-30 21:49:34 +08:00
zthxxx
069a86faa0 chore: move Auto_Bangumi/src -> Auto_Bangumi/backend/src, prepare for merge WebUI repo 2023-06-06 22:33:00 +08:00