mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 07:46:30 +01:00
Changed Verification order.
This commit is contained in:
@@ -71,17 +71,12 @@ function login(req: AppRequest, res: Response) {
|
||||
const guessedPassword = req.body.password;
|
||||
const guessedTotp = req.body.token;
|
||||
|
||||
if (totp.isTotpEnabled()){
|
||||
if (!verifyTOTP(guessedTotp)) {
|
||||
sendLoginError(req, res);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (verifyPassword(guessedPassword)) {
|
||||
if (!verifyPassword(guessedPassword)) {
|
||||
if (totp.isTotpEnabled()){
|
||||
if (!verifyTOTP(guessedTotp)) {
|
||||
sendLoginError(req, res);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const rememberMe = req.body.rememberMe;
|
||||
|
||||
Reference in New Issue
Block a user