aboutsummaryrefslogtreecommitdiffstats
path: root/util/sasl/scram.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-06-06 00:54:28 +0200
committerKim Alvefur <zash@zash.se>2020-06-06 00:54:28 +0200
commite0837564185908155cf41dcacc0d99d9a5df33b0 (patch)
tree5dab399947091600ef0a5f4937cd915844ad6584 /util/sasl/scram.lua
parentc36203ba7ffe035f91f5065184cf741d3d32cce7 (diff)
parent71c6728e69c98d7a70ec4ae4ffacb08ae683803f (diff)
downloadprosody-e0837564185908155cf41dcacc0d99d9a5df33b0.tar.gz
prosody-e0837564185908155cf41dcacc0d99d9a5df33b0.zip
Merge 0.11->trunk
Diffstat (limited to 'util/sasl/scram.lua')
-rw-r--r--util/sasl/scram.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/sasl/scram.lua b/util/sasl/scram.lua
index b3370d4b..009a01ce 100644
--- a/util/sasl/scram.lua
+++ b/util/sasl/scram.lua
@@ -105,6 +105,10 @@ local function get_scram_hasher(H, HMAC, Hi)
if iteration_count < 4096 then
log("warn", "Iteration count < 4096 which is the suggested minimum according to RFC 5802.")
end
+ password = saslprep(password);
+ if not password then
+ return false, "password fails SASLprep";
+ end
local salted_password = Hi(password, salt, iteration_count);
local stored_key = H(HMAC(salted_password, "Client Key"))
local server_key = HMAC(salted_password, "Server Key");