Software /
code /
prosody
Diff
util/sasl/scram.lua @ 5829:40c16475194e
Check whether we support the proposed channel binding type.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Sat, 15 Jan 2011 17:59:15 +0100 |
parent | 5828:24de22c01f8d |
child | 5833:b1fa865ee6b2 |
line wrap: on
line diff
--- a/util/sasl/scram.lua Wed Jan 12 21:29:37 2011 +0100 +++ b/util/sasl/scram.lua Sat Jan 15 17:59:15 2011 +0100 @@ -137,6 +137,11 @@ 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";