-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more SASL validation and fix tests (#2436)
* Add sha256 SASL helper * Rename internal createHMAC(...) to hmacSha256(...) * Add parseAttributePairs(...) helper for SASL * Tighten arg checks in SASL xorBuffers(...) * Add SASL nonce check for printable chars * Add SASL server salt and server signature base64 validation * Add check for non-empty SASL server nonce * Rename SASL helper to parseServerFirstMessage(...) * Add parameter validation to SASL continueSession(...) * Split out SASL final message parsing into parseServerFinalMessage(...) * Fix SCRAM tests Removes custom assert.throws(...) so that the real one from the assert package is used and fixes the SCRAM tests to reflect the updated error messages and actual checking of errors. Previously the custom assert.throws(...) was ignoring the error signature validation.
- Loading branch information
Showing
3 changed files
with
141 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters