Commit Graph
11 Commits
Author SHA1 Message Date
Francis Cao 0a77e50da1 Harden 2FA APi routes and UI when 2FA env var missing. Closes #4443. 2026-08-14 10:32:09 -07:00
NoiceHax a40b418038 fix(2fa): gate two-factor auth when the encryption key is missing
TWO_FACTOR_ENCRYPTION_KEY has no default, so instances upgrading to 3.3
without setting it hit an unhandled throw from encryptSecret: the setup
dialog only reported "Something went wrong", and where 2FA was required
the blocking dialog made the whole app unusable. The status endpoint now
reports 2FA as not required while the key is missing or invalid, and
setup initiation returns 503 with a two-factor-error-not-configured code
that the setup dialog renders as a readable message. Also documents the
variable in the README and the example compose file.

Closes #4443
2026-08-13 22:39:31 +05:30
Mike Cao 65e810ec79 Add coverage for core utility behavior 2026-07-24 13:52:37 -07:00
Rudy B. b4bb9cc727 fix(2FA): put disable 2FA cleanup in transaction 2026-04-25 18:39:08 +02:00
Rudy B. ebcc61c2b6 fix(2FA): add hex key validation for TWO_FACTOR_ENCRYPTION_KEY 2026-04-25 18:33:17 +02:00
Rudy B. 3f8b3e8aee fix(2FA): cast transaction return to match return type 2026-04-25 17:57:45 +02:00
Rudy B. 5c5d1c3524 fix(2FA): use serializable transaction for failed attempts recording 2026-04-25 17:28:29 +02:00
Rudy B. df913fd77f chore: remove unnecessary function 2026-04-25 16:13:21 +02:00
Rudy B. cbd3aa2719 chore(2FA): rename property to match usage 2026-04-25 12:27:25 +02:00
Rudy B. a9a873c293 fix(2FA): increase backup codes length for improved security 2026-04-25 12:20:47 +02:00
Rudy B. 683b956b9f feat(2FA): add core library functions for TOTP, backup codes and rate limiting 2026-04-25 01:40:06 +02:00