mirror of
https://hk.gh-proxy.com/https://github.com/NodeBB/nodebb-plugin-2factor.git
synced 2025-10-04 09:24:05 +08:00
fix: #88, allow reset and confirm routes to bypass 2fa check
This commit is contained in:
parent
53ff25613d
commit
79748c5bc3
1 changed files with 1 additions and 1 deletions
|
@ -334,7 +334,7 @@ plugin.check = async ({ req, res }) => {
|
|||
}
|
||||
|
||||
const requestPath = req.baseUrl + req.path;
|
||||
const exemptPrefixes = ['/api/v3/'];
|
||||
const exemptPrefixes = ['/api/v3/', '/reset', '/confirm'];
|
||||
let exemptPaths = ['/login/2fa', '/login/2fa/authn', '/login/2fa/totp', '/login/2fa/backup', '/2factor/authn/verify', '/register/complete'];
|
||||
exemptPaths = exemptPaths.reduce((memo, cur) => {
|
||||
memo.push(nconf.get('relative_path') + cur);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue