Compare commits

...

11 Commits

Author SHA1 Message Date
zhanghongtong a7c4266acb fix(enhanced_auth): fix bug when "conn_props = undefined" 2020-06-20 14:29:40 +08:00
JianBo He 7198960746 fix(confs): delete `X-Forwarded-*` options for wss listener 2020-06-06 13:56:15 +08:00
zhanghongtong e81b8d6a4a Merge remote-tracking branch 'origin/master' into release-4.1 2020-06-04 09:00:12 +00:00
turtleDeng 2ac50dcfd0
Merge pull request #3479 from emqx/master 2020-05-23 10:27:52 +08:00
tigercl 77529be497
Merge pull request #3465 from emqx/master
Auto-pull-request-by-2020-05-15
2020-05-15 14:17:46 +08:00
tigercl 5aa4cb4b5c
Merge pull request #3430 from emqx/master
Auto-pull-request-by-2020-04-30
2020-04-30 17:57:24 +08:00
turtleDeng be0aeb1b80
Merge pull request #3413 from emqx/master
Update rebar.config
2020-04-26 20:57:13 +08:00
turtleDeng e270b168bf
Merge pull request #3411 from emqx/master
Auto-pull-request-by-2020-04-26
2020-04-26 19:38:09 +08:00
tigercl 0dace34937
Merge pull request #3398 from emqx/master
Auto-pull-request-by-2020-04-17
2020-04-17 20:59:41 +08:00
turtleDeng 455a04e92f
Merge pull request #3381 from emqx/master
Auto-pull-request-by-2020-04-11
2020-04-11 17:42:55 +08:00
张奇怪 2ddda28821
Merge pull request #3347 from emqx/master
Auto-pull-request-by-2020-03-27
2020-03-28 00:59:38 +08:00
3 changed files with 3 additions and 11 deletions

View File

@ -1705,16 +1705,6 @@ listener.wss.external.access.1 = allow all
## Value: on | off
listener.wss.external.verify_protocol_header = on
## See: listener.ws.external.proxy_address_header
##
## Value: String
## listener.wss.external.proxy_address_header = X-Forwarded-For
## See: listener.ws.external.proxy_port_header
##
## Value: String
## listener.wss.external.proxy_port_header = X-Forwarded-Port
## Enable the Proxy Protocol V1/2 support.
##
## See: listener.tcp.$name.proxy_protocol

View File

@ -1176,7 +1176,7 @@ enhanced_auth(?CONNECT_PACKET(#mqtt_packet_connect{
end;
enhanced_auth(?AUTH_PACKET(_ReasonCode, Properties), Channel = #channel{conninfo = ConnInfo}) ->
AuthMethod = maps:get('Authentication-Method', maps:get(conn_props, ConnInfo), undefined),
AuthMethod = emqx_mqtt_props:get('Authentication-Method', emqx_mqtt_props:get(conn_props, ConnInfo, #{}), undefined),
NAuthMethod = emqx_mqtt_props:get('Authentication-Method', Properties, undefined),
AuthData = emqx_mqtt_props:get('Authentication-Data', Properties, undefined),
case NAuthMethod =:= undefined orelse NAuthMethod =/= AuthMethod of

View File

@ -152,6 +152,8 @@ t_handle_in_re_auth(_) ->
},
{ok, [{outgoing, ?DISCONNECT_PACKET(?RC_BAD_AUTHENTICATION_METHOD)}, {close, bad_authentication_method}], _} =
emqx_channel:handle_in(?AUTH_PACKET(?RC_RE_AUTHENTICATE,Properties), channel()),
{ok, [{outgoing, ?DISCONNECT_PACKET(?RC_BAD_AUTHENTICATION_METHOD)}, {close, bad_authentication_method}], _} =
emqx_channel:handle_in(?AUTH_PACKET(?RC_RE_AUTHENTICATE,Properties), channel(#{conninfo => #{proto_ver => ?MQTT_PROTO_V5, conn_props => undefined}})),
{ok, [{outgoing, ?DISCONNECT_PACKET(?RC_NOT_AUTHORIZED)}, {close, not_authorized}], _} =
emqx_channel:handle_in(?AUTH_PACKET(?RC_RE_AUTHENTICATE,Properties), channel(#{conninfo => #{proto_ver => ?MQTT_PROTO_V5, conn_props => Properties}})).