diff --git a/src/mod_legacy_auth.erl b/src/mod_legacy_auth.erl index 0ae3253c9..dcf1b5def 100644 --- a/src/mod_legacy_auth.erl +++ b/src/mod_legacy_auth.erl @@ -69,7 +69,7 @@ c2s_unauthenticated_packet(State, #iq{type = T, sub_els = [_]} = IQ) catch _:{xmpp_codec, Why} -> Txt = xmpp:io_format_error(Why), Lang = maps:get(lang, State), - Err = xmpp:make_error(IQ, xmpp:error_bad_request(Txt, Lang)), + Err = xmpp:make_error(IQ, xmpp:err_bad_request(Txt, Lang)), {stop, ejabberd_c2s:send(State, Err)} end; c2s_unauthenticated_packet(State, _) -> diff --git a/src/mod_register.erl b/src/mod_register.erl index c74d99d38..b7c9ef07c 100644 --- a/src/mod_register.erl +++ b/src/mod_register.erl @@ -108,7 +108,7 @@ c2s_unauthenticated_packet(#{ip := IP, server := Server} = State, catch _:{xmpp_codec, Why} -> Txt = xmpp:io_format_error(Why), Lang = maps:get(lang, State), - Err = xmpp:make_error(IQ, xmpp:error_bad_request(Txt, Lang)), + Err = xmpp:make_error(IQ, xmpp:err_bad_request(Txt, Lang)), {stop, ejabberd_c2s:send(State, Err)} end; c2s_unauthenticated_packet(State, _) ->