aboutsummaryrefslogtreecommitdiffstats
path: root/util/sasl/scram.lua
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2011-01-15 17:59:15 +0100
committerTobias Markmann <tm@ayena.de>2011-01-15 17:59:15 +0100
commit1e72875d5263b9478b257b27a3784dcd7fc4dcc3 (patch)
treec9965ea1157433946f3999babd24aa32cbe37d0f /util/sasl/scram.lua
parentb73cbae8a5e49f7f3300e7c028e570ad8a58e46d (diff)
downloadprosody-1e72875d5263b9478b257b27a3784dcd7fc4dcc3.tar.gz
prosody-1e72875d5263b9478b257b27a3784dcd7fc4dcc3.zip
Check whether we support the proposed channel binding type.
Diffstat (limited to 'util/sasl/scram.lua')
-rw-r--r--util/sasl/scram.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/sasl/scram.lua b/util/sasl/scram.lua
index fbe3547b..76e9c152 100644
--- a/util/sasl/scram.lua
+++ b/util/sasl/scram.lua
@@ -137,6 +137,11 @@ local function scram_gen(hash_name, H_f, HMAC_f)
if string.sub(self.state.gs2_cbind_flag, 0, 1) == "y" then
return "failure", "malformed-request";
end
+
+ -- check whether we support the proposed channel binding type
+ if not self.profile.cb[self.state.gs2_cbind_name] then
+ return "failure", "malformed-request", "Proposed channel binding type isn't supported.";
+ end
else
if self.state.gs2_cbind_flag ~= "n" and self.state.gs2_cbind_flag ~= "y" then
return "failure", "malformed-request";