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

Commit dccc2ba

Browse files
authored
fix(scram): allow errors to be passed through callbacks
Fixes NODE-1876
1 parent e45b154 commit dccc2ba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/auth/scram.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ class ScramSHA extends AuthProvider {
143143

144144
processedPassword = saslprep ? saslprep(password) : password;
145145
} else {
146-
processedPassword = passwordDigest(username, password);
146+
try {
147+
processedPassword = passwordDigest(username, password);
148+
} catch (e) {
149+
return callback(e);
150+
}
147151
}
148152

149153
// Clean up the user

0 commit comments

Comments
 (0)