From f4aef09dbbb49270599487b40429f23fdc9ea6d2 Mon Sep 17 00:00:00 2001 From: Jannik Schönartz Date: Tue, 5 Mar 2019 03:45:57 +0000 Subject: [server/authentication] Fix api syntax and eslint --- server/lib/authentication.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/lib/authentication.js') diff --git a/server/lib/authentication.js b/server/lib/authentication.js index 58ae73c..87fb02e 100644 --- a/server/lib/authentication.js +++ b/server/lib/authentication.js @@ -169,7 +169,7 @@ async function verifyHash (password, hash, userId) { // Hash will be a Buffer of length SecurePassword.HASH_BYTES. if (hash.length !== securePassword.HASH_BYTES) return { code: 500, error: 'DATABASE_HASH_INVALID', message: 'The hash in the database is corrupted.' } // Password must be a Buffer of length SecurePassword.PASSWORD_BYTES_MIN - SecurePassword.PASSWORD_BYTES_MAX. - if (password.length < securePassword.PASSWORD_BYTES_MIN || password.length > securePassword.PASSWORD_BYTES_MAX) return { code: 401, error: 'PASSWORD_INVALID', message: 'The provided password has an invalid length.' } + if (password.length < securePassword.PASSWORD_BYTES_MIN || password.length > securePassword.PASSWORD_BYTES_MAX) return { code: 401, error: 'PASSWORD_INVALID', message: 'The provided password is invalid.' } // Verification of the password. Rehash if needed. try { -- cgit v1.2.3-55-g7522