Software /
code /
prosody-modules
Changeset
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 |
parents | 6162:a58fb6a05412 |
children | 6164:eedeed1bccf7 |
files | mod_sasl_ssdp/README.md mod_sasl_ssdp/mod_sasl_ssdp.lua |
diffstat | 2 files changed, 5 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_sasl_ssdp/README.md Fri Jan 24 06:55:44 2025 +0100 +++ b/mod_sasl_ssdp/README.md Sat Jan 25 00:04:37 2025 +0100 @@ -12,11 +12,6 @@ client-side pinning which is currently the most common method of downgrade protection. -**Note:** This module implements version 0.3.0 of XEP-0474. As of 2023-12-05, -this version is not yet published on xmpp.org. Version 0.3.0 of the XEP is -implemented in Monal 6.0.1 and go-sendxmpp 0.8.0. No other clients are currently -known to implement the XEP at the time of writing. - # Configuration There are no configuration options for this module, just load it as normal.
--- 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