halkyon/packages/halkyon_base_server/migrations
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tizian 「ティツィアーン」 1d4320370b
fix(auth): a code by mail serves only what it was asked for
Codes by mail were tied to nothing but their address (the re-review's
seventh finding): a hostile instance could answer that a setup never
finished, have the person type a code into it, relay it to start the real
instance's account reset, and 72 hours later relay a second to finish it
with its own password and keys; the mail said "to sign in" whatever the
code was for. A code is now asked for a purpose (signUp, finishSetup,
authenticatorReset, accountReset, deletion), only that purpose takes it (any
other is refused as no longer valid, leaving the code as it was), and its
mail says what it would do ("to reset your account on learn.halkyon.eu: a
new password and new keys, and what was encrypted with the old ones is
lost") and to type it only in the app on that instance, nowhere else. The
app asks for each code with the purpose of its step.

Migration (module, Learn's and Todo's servers, Learn's device schema):
ALTER TABLE "email_code_request" ADD COLUMN "purpose" text; nullable,
so the requests of the last 15 minutes before it stay, taken by nothing
and forgotten within the hour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-23 14:12:48 +02:00
..
20261019115750898 halkyon_base: a Serverpod module for sign-in, accounts and instance basics 2026-10-19 14:29:28 +02:00
20261019200558685 refactor(profile): handles and profiles move into halkyon_base 2026-10-22 18:11:07 +02:00
20261019202835333-deletion-notices feat(accounts): one account across an instance's services (ADR 0016) 2026-10-22 18:11:07 +02:00
20261020111123780-passwords feat(auth): a password with TOTP on the register, and resets 2026-10-22 18:11:10 +02:00
20261020124836165-sessions-ended feat(auth): change the password and the recovery phrase while signed in 2026-10-23 14:12:40 +02:00
20261020185619505-recovery-proof-key fix(auth)!: the recovery phrase is proved by a key of its own 2026-10-23 14:12:43 +02:00
20261020194005842-second-factor-waits fix(auth): codes wait after ten wrong in a row, and the owner is told 2026-10-23 14:12:44 +02:00
20261020204618337-session-code-tries fix(auth): a session's wrong codes end the session, not the account's codes 2026-10-23 14:12:47 +02:00
20261020211224310-email-code-purpose fix(auth): a code by mail serves only what it was asked for 2026-10-23 14:12:48 +02:00
migration_registry.txt fix(auth): a code by mail serves only what it was asked for 2026-10-23 14:12:48 +02:00