2FA screens: the back link is checked on the server (twoFactor.safeBack)
@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]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
39309c5c1c
commit
93e75426ab
@@ -327,6 +327,8 @@ export type {
|
||||
} from './modules/security/index.js'
|
||||
export type { BuildSecurityHeadersArgs, SecurityHeader } from './modules/security/index.js'
|
||||
|
||||
export { safeAdminBack, wrapTotpViews } from './modules/security/totp/safeBack.js'
|
||||
export type { SafeBackContext, SafeBackRule } from './modules/security/totp/safeBack.js'
|
||||
export { requireSecondFactor, secondFactorPassed } from './modules/security/totp/secondFactor.js'
|
||||
export { TOTP_TEXTS, TOTP_VIEW_TITLE } from './modules/security/totp/totpTexts.js'
|
||||
export type { VerifyLimitOptions } from './modules/security/totp/verifyLimit.js'
|
||||
|
||||
Reference in New Issue
Block a user