mirror of
https://github.com/zadam/trilium.git
synced 2026-05-07 02:36:07 +02:00
i18n(server): password not correct
This commit is contained in:
@@ -212,6 +212,9 @@
|
||||
"button": "Login",
|
||||
"sign_in_with_sso": "Sign in with {{ ssoIssuerName }}"
|
||||
},
|
||||
"password": {
|
||||
"incorrect": "The password you entered is incorrect."
|
||||
},
|
||||
"set_password": {
|
||||
"title": "Set Password",
|
||||
"heading": "Set password",
|
||||
|
||||
@@ -15,6 +15,7 @@ import etapiTokenService from "../../services/etapi_tokens.js";
|
||||
import type { Request } from "express";
|
||||
import totp from "../../services/totp";
|
||||
import recoveryCodeService from "../../services/encryption/recovery_codes";
|
||||
import { t } from "i18next";
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
@@ -126,7 +127,7 @@ function loginToProtectedSession(req: Request) {
|
||||
if (!passwordEncryptionService.verifyPassword(password)) {
|
||||
return {
|
||||
success: false,
|
||||
message: "Given current password doesn't match hash"
|
||||
message: t("password.incorrect")
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import myScryptService from "./my_scrypt.js";
|
||||
import { randomSecureToken, toBase64 } from "../utils.js";
|
||||
import passwordEncryptionService from "./password_encryption.js";
|
||||
import { ChangePasswordResponse } from "@triliumnext/commons";
|
||||
import { t } from "i18next";
|
||||
|
||||
function isPasswordSet() {
|
||||
return !!sql.getValue("SELECT value FROM options WHERE name = 'passwordVerificationHash'");
|
||||
@@ -17,7 +18,7 @@ function changePassword(currentPassword: string, newPassword: string): ChangePas
|
||||
if (!passwordEncryptionService.verifyPassword(currentPassword)) {
|
||||
return {
|
||||
success: false,
|
||||
message: "Given current password doesn't match hash"
|
||||
message: t("password.incorrect")
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user