aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorClombrong <cromblong@egregore.fun>2025-06-13 09:13:36 +0200
committerClombrong <cromblong@egregore.fun>2025-06-13 21:55:41 +0200
commit1389ea74ad01356d06d7bd18d0a759cb0da8f4f0 (patch)
tree95d9699cc1b1bc63681000b5bbf78b0078d3acfa /lib
parent7444155d05a63fdbad93ee6f54d92efe32f2e337 (diff)
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)
Diffstat (limited to 'lib')
-rw-r--r--lib/sasl.ml4
1 files changed, 2 insertions, 2 deletions
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