chore: fix bad conflict resolution

This commit is contained in:
zmstone 2024-06-14 16:57:53 +02:00
parent b86d631744
commit 626aae6edf
4 changed files with 6 additions and 3 deletions

View File

@ -251,7 +251,7 @@ t_session_subscription_idempotency(Config) ->
ok
end,
fun(Trace) ->
fun(_Trace) ->
Session = session_open(Node1, ClientId),
?assertMatch(
#{SubTopicFilter := #{}},
@ -324,7 +324,7 @@ t_session_unsubscription_idempotency(Config) ->
ok
end,
fun(Trace) ->
fun(_Trace) ->
Session = session_open(Node1, ClientId),
?assertEqual(
#{},

View File

@ -1738,7 +1738,7 @@ maybe_add_cert(Map, #channel{conninfo = ConnInfo}) ->
maybe_add_cert(Map, ConnInfo);
maybe_add_cert(Map, #{peercert := PeerCert}) when is_binary(PeerCert) ->
%% NOTE: it's raw binary at this point,
%% encoding to PEM (base64) is done lazy in emqx_authn_utils:render_var
%% encoding to PEM (base64) is done lazy in emqx_auth_utils:render_var
Map#{cert_pem => PeerCert};
maybe_add_cert(Map, _) ->
Map.

View File

@ -39,6 +39,7 @@
?VAR_PEERHOST,
?VAR_CERT_SUBJECT,
?VAR_CERT_CN_NAME,
?VAR_CERT_PEM,
?VAR_NS_CLIENT_ATTRS
]).

View File

@ -207,6 +207,8 @@ render_var(_, undefined) ->
% Any allowed but undefined binding will be replaced with empty string, even when
% rendering SQL values.
<<>>;
render_var(?VAR_CERT_PEM, Value) ->
base64:encode(Value);
render_var(?VAR_PEERHOST, Value) ->
inet:ntoa(Value);
render_var(?VAR_PASSWORD, Value) ->