Mercurial > prosody-modules
comparison mod_sasl2_fast/mod_sasl2_fast.lua @ 5897:896e7c7bf87f
Merge
author | Stephen Paul Weber <singpolyma@singpolyma.net> |
---|---|
date | Tue, 30 Apr 2024 15:07:06 -0500 |
parents | 563c2c70cb9f |
children | e67fc7b66c13 |
comparison
equal
deleted
inserted
replaced
5896:5b95e06d75d5 | 5897:896e7c7bf87f |
---|---|
194 local backend = sasl_handler.profile[backend_profile_name]; | 194 local backend = sasl_handler.profile[backend_profile_name]; |
195 local authc_username, token_hash = message:match("^([^%z]+)%z(.+)$"); | 195 local authc_username, token_hash = message:match("^([^%z]+)%z(.+)$"); |
196 if not authc_username then | 196 if not authc_username then |
197 return "failure", "malformed-request"; | 197 return "failure", "malformed-request"; |
198 end | 198 end |
199 if not sasl_handler.profile.cb then | |
200 module:log("warn", "Attempt to use channel binding %s with SASL profile that does not support any channel binding (FAST: %s)", cb_name, sasl_handler.fast); | |
201 return "failure", "malformed-request"; | |
202 elseif not sasl_handler.profile.cb[cb_name] then | |
203 module:log("warn", "SASL profile does not support %s channel binding (FAST: %s)", cb_name, sasl_handler.fast); | |
204 return "failure", "malformed-request"; | |
205 end | |
199 local cb_data = cb_name and sasl_handler.profile.cb[cb_name](sasl_handler) or ""; | 206 local cb_data = cb_name and sasl_handler.profile.cb[cb_name](sasl_handler) or ""; |
200 local ok, authz_username, response, rotation_needed = backend( | 207 local ok, authz_username, response, rotation_needed = backend( |
201 mechanism_name, | 208 mechanism_name, |
202 authc_username, | 209 authc_username, |
203 sasl_handler.client_id, | 210 sasl_handler.client_id, |