Mercurial > prosody-modules
diff 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 |
line wrap: on
line diff
--- a/mod_sasl2_fast/mod_sasl2_fast.lua Tue Apr 30 15:06:03 2024 -0500 +++ b/mod_sasl2_fast/mod_sasl2_fast.lua Tue Apr 30 15:07:06 2024 -0500 @@ -196,6 +196,13 @@ if not authc_username then return "failure", "malformed-request"; end + if not sasl_handler.profile.cb then + 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); + return "failure", "malformed-request"; + elseif not sasl_handler.profile.cb[cb_name] then + module:log("warn", "SASL profile does not support %s channel binding (FAST: %s)", cb_name, sasl_handler.fast); + return "failure", "malformed-request"; + end local cb_data = cb_name and sasl_handler.profile.cb[cb_name](sasl_handler) or ""; local ok, authz_username, response, rotation_needed = backend( mechanism_name,