summaryrefslogtreecommitdiffstats
path: root/server/lib/authentication.js
diff options
context:
space:
mode:
authorJannik Schönartz2019-03-05 04:45:57 +0100
committerJannik Schönartz2019-03-05 04:45:57 +0100
commitf4aef09dbbb49270599487b40429f23fdc9ea6d2 (patch)
tree060150d83ec5feefa8d8970e7b8c3ccb077913e0 /server/lib/authentication.js
parent[webapp] migrate from vue cli 2 to vue cli 3 (diff)
downloadbas-f4aef09dbbb49270599487b40429f23fdc9ea6d2.tar.gz
bas-f4aef09dbbb49270599487b40429f23fdc9ea6d2.tar.xz
bas-f4aef09dbbb49270599487b40429f23fdc9ea6d2.zip
[server/authentication] Fix api syntax and eslint
Diffstat (limited to 'server/lib/authentication.js')
-rw-r--r--server/lib/authentication.js2
1 files changed, 1 insertions, 1 deletions
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 {