diff --git a/lib/auth/scram.js b/lib/auth/scram.js index 687f8666d..3a86ec5db 100644 --- a/lib/auth/scram.js +++ b/lib/auth/scram.js @@ -143,7 +143,11 @@ class ScramSHA extends AuthProvider { processedPassword = saslprep ? saslprep(password) : password; } else { - processedPassword = passwordDigest(username, password); + try { + processedPassword = passwordDigest(username, password); + } catch (e) { + return callback(e); + } } // Clean up the user