diff options
author | Andreas Nilsson <andreas.nilsson@10gen.com> | 2015-03-27 15:32:06 -0400 |
---|---|---|
committer | Andreas Nilsson <andreas.nilsson@10gen.com> | 2015-03-27 15:36:46 -0400 |
commit | 4448118e2f7e1b402e63352d5b007b27328372d8 (patch) | |
tree | e43db09af753c71d1885c055cf9f546805cc27c1 /src/mongo/crypto | |
parent | cfce87ebbb36f2acf63eb5a29f6aec95a55e3866 (diff) | |
download | mongo-4448118e2f7e1b402e63352d5b007b27328372d8.tar.gz |
SERVER-17719 Fail gracefully in shell for empty SCRAM passwords
Diffstat (limited to 'src/mongo/crypto')
-rw-r--r-- | src/mongo/crypto/crypto_tom.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/crypto/crypto_tom.cpp b/src/mongo/crypto/crypto_tom.cpp index 85cc8387bb3..ff739d57365 100644 --- a/src/mongo/crypto/crypto_tom.cpp +++ b/src/mongo/crypto/crypto_tom.cpp @@ -67,6 +67,10 @@ namespace crypto { const size_t inputLen, unsigned char* output, unsigned int* outputLen) { + if (!key || !input || !output) { + return false; + } + static int hashId = -1; if (hashId == -1) { register_hash (&sha1_desc); |