mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-18 00:51:15 +00:00
lock to prevent parallel logins
This commit is contained in:
@@ -137,7 +137,7 @@ export const registerIdentityLdapAuthRouter = async (server: FastifyZodProvider)
|
||||
},
|
||||
preValidation: [
|
||||
async (req, res) => {
|
||||
await server.services.identityLdapAuth.checkLdapLockout({
|
||||
const { lock } = await server.services.identityLdapAuth.checkLdapLockout({
|
||||
identityId: req.body.identityId,
|
||||
username: req.body.username
|
||||
});
|
||||
@@ -167,6 +167,8 @@ export const registerIdentityLdapAuthRouter = async (server: FastifyZodProvider)
|
||||
}
|
||||
|
||||
throw error;
|
||||
} finally {
|
||||
await lock.release();
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user