25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-16 17:15:55 +01:00

Merge remote-tracking branch 'processone/pr/4323'

* processone/pr/4323:
  Enable allow_unencrypted_sasl2 on websockets
This commit is contained in:
Holger Weiss 2024-12-03 18:58:25 +01:00
commit 7fce7d1049
2 changed files with 7 additions and 0 deletions

View File

@ -69,6 +69,7 @@
default_host,
custom_headers,
trail = <<>>,
allow_unencrypted_sasl2,
addr_re,
sock_peer_name = none
}).
@ -133,10 +134,12 @@ init(SockMod, Socket, Opts) ->
CustomHeaders = proplists:get_value(custom_headers, Opts, []),
AllowUnencryptedSasl2 = proplists:get_bool(allow_unencrypted_sasl2, Opts),
State = #state{sockmod = SockMod1,
socket = Socket1,
custom_headers = CustomHeaders,
options = Opts,
allow_unencrypted_sasl2 = AllowUnencryptedSasl2,
request_handlers = RequestHandlers,
sock_peer_name = SockPeer,
addr_re = RE},
@ -916,6 +919,8 @@ normalize_path([Part | Path], Norm) ->
listen_opt_type(tag) ->
econf:binary();
listen_opt_type(allow_unencrypted_sasl2) ->
econf:bool();
listen_opt_type(request_handlers) ->
econf:map(
econf:and_then(
@ -941,6 +946,7 @@ listen_options() ->
{protocol_options, undefined},
{tls, false},
{tls_compression, false},
{allow_unencrypted_sasl2, false},
{request_handlers, []},
{tag, <<>>},
{default_host, undefined},

View File

@ -122,6 +122,7 @@ init([{#ws{ip = IP, http_opts = HOpts}, _} = WS]) ->
({max_ack_queue, _}) -> true;
({ack_timeout, _}) -> true;
({resume_timeout, _}) -> true;
({allow_unencrypted_sasl2, _}) -> true;
({max_resume_timeout, _}) -> true;
({resend_on_timeout, _}) -> true;
({access, _}) -> true;