Security audit 2026-12, F0: inside an account's setup window its password alone
enrolled an authenticator of the caller's choosing; the owner was locked out.
- /setup-totp for an account without a factor: IAPL checks the code, keeps the
secret pending (payload-kv), mails a single-use 30-min link to the account and
ties it to the enrolling browser; the package's handler (and its -totp cookie)
is never used for a first enrolment
- GET /api/iapl/two-factor/confirm = a page with one button; POST confirms
(own origin, same browser), ends the account's sessions, signs nobody in
- notice mails on every enrolment, change, removal / reset (any path)
- mail not working: link to the server log, admin confirms on the account page
(POST /api/iapl/two-factor/confirm-pending), doctor rule 2fa-enrolment-mail
- options and opt-out (confirmByEmail: false), building blocks exported
- tests: HTTP suite on SQLite, MongoDB, Postgres; built-site spec in e2e:built;
closed doors and judged routes; docs, AGENT.md, skills, changelog
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- docs, AGENT.md, the 16 skills, PROGRAMISTA and README use the preferred names (scripted, same list of forms);
past CHANGELOG entries and the proposals in docs/dev are not rewritten
- AGENT.md: 'Names: IAPL and ipal-kit' — old name, new name, state in 1.x; what is not renamed; storageNames
- iapl-upgrade '→ 1.17.0', PROGRAMISTA §6 item 72, CHANGELOG 1.17.0 (draft): nothing required
- env.md, doctor.md (legacy-names, storage-names), stats.md, security.md, project-starter.md, iapl-reference, iapl-setup
- skill scripts read ipal-audit-skip and IPAL_IP_HEADER too; audit rule ids stay what they were
- reference site: iapl(), iapl-doctor.json, iapl-* skills, storageNames: 'iapl'; INDEX.md regenerated
Co-Authored-By: Claude Fable 5.2 <[email protected]>
@clocklimited/payload-2fa sends the browser to the `back` query value after a
valid code without checking it (GHSA-rffw-fq79-g3ch upstream, not fixed in the
fork): a prepared link ran script in the panel or left the site.
SafeTotpView now stands in front of the package's setup and verify views and
passes on a checked value: a path on the site's origin inside the admin route,
else the admin root. The package's views stay in the import map through
admin.dependencies, so ipal-kit still never imports the package.
twoFactor.safeBack: false turns it off, a function replaces the rule;
safeAdminBack, wrapTotpViews and SafeTotpView are exported. Projects with 2FA
must regenerate the admin import map.
Co-Authored-By: Claude Fable 5.2 <[email protected]>