Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
fix(scram): allow errors to be passed through callbacks
Browse files Browse the repository at this point in the history
Fixes NODE-1876
  • Loading branch information
kvwalker authored Feb 19, 2019
1 parent e45b154 commit dccc2ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/auth/scram.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dccc2ba

Please sign in to comment.