Software /
code /
prosody-modules
Diff
mod_sasl_ssdp/mod_sasl_ssdp.lua @ 6163:eff78e2c7d22
mod_sasl_ssdp: Upgrade to version 0.4.0 with new delimiter
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Sat, 25 Jan 2025 00:04:37 +0100 |
parent | 6137:4cb1cad2badd |
child | 6164:eedeed1bccf7 |
line wrap: on
line diff
--- a/mod_sasl_ssdp/mod_sasl_ssdp.lua Fri Jan 24 06:55:44 2025 +0100 +++ b/mod_sasl_ssdp/mod_sasl_ssdp.lua Sat Jan 25 00:04:37 2025 +0100 @@ -16,6 +16,8 @@ ["SCRAM-SHA-1-PLUS"] = hashes.sha1; ["SCRAM-SHA-256"] = hashes.sha256; ["SCRAM-SHA-256-PLUS"] = hashes.sha256; + ["SCRAM-SHA-512"] = hashes.sha512; + ["SCRAM-SHA-512-PLUS"] = hashes.sha512; }; function add_ssdp_info(event) @@ -47,12 +49,12 @@ local cb_list = cb and array.collect(it.keys(cb)):sort(); local ssdp_string; if cb_list then - ssdp_string = mechanism_list:concat(",").."|"..cb_list:concat(","); + ssdp_string = mechanism_list:concat("\36").."\37"..cb_list:concat("\36"); else - ssdp_string = mechanism_list:concat(","); + ssdp_string = mechanism_list:concat("\36"); end module:log("debug", "Calculated SSDP string: %s", ssdp_string); - event.message = event.message..",d="..base64_enc(hash(ssdp_string)); + event.message = event.message..",h="..base64_enc(hash(ssdp_string)); sasl_handler.state.server_first_message = event.message; end