From 1389ea74ad01356d06d7bd18d0a759cb0da8f4f0 Mon Sep 17 00:00:00 2001 From: Clombrong Date: Fri, 13 Jun 2025 09:13:36 +0200 Subject: feat(sasl): replace full jid with node part in SASL auth sasl'ing with the full jid is not compliant (and works with ejabberd only) --- lib/sasl.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sasl.ml') diff --git a/lib/sasl.ml b/lib/sasl.ml index 606beb6..5a0dd80 100644 --- a/lib/sasl.ml +++ b/lib/sasl.ml @@ -13,9 +13,9 @@ let read_sasl_error = function type sasl_auth = (string option, sasl_error * (string * string) option) result -let send_auth_stanza (stream, push) jid pass mechanism = +let send_auth_stanza (stream, push) localpart pass mechanism = let gen_auth = function - | PLAIN -> Base64.encode_exn ("\x00" ^ jid ^ "\x00" ^ pass) + | PLAIN -> Base64.encode_exn ("\x00" ^ localpart ^ "\x00" ^ pass) and parse_sasl_response stanza = let open Markup in let parse_additional_info = function -- cgit v1.2.3