Skip to content

Commit b07dcf8

Browse files
mkuratczykmergify[bot]
authored andcommitted
OTP28: re:split change; street-address macro
erlang/otp#9739 In OTP28+, splitting an empty string returns an empty list, not an empty string (the input). Additionally `street-address` macro was removed in OTP28 - replace with the value it used to be. Lastly, rabbitmq_auth_backend_oauth2 has an MQTT test, so add rabbitmq_mqtt to TEST_DEPS (cherry picked from commit 637a2bc)
1 parent 2db9a61 commit b07dcf8

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

deps/rabbit_common/src/rabbit_cert_info.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ format_rdn(#'AttributeTypeAndValue'{type = T, value = V}) ->
145145
{?'id-at-pseudonym' , "PSEUDONYM"},
146146
{?'id-domainComponent' , "DC"},
147147
{?'id-emailAddress' , "EMAILADDRESS"},
148-
{?'street-address' , "STREET"},
148+
{17 , "STREET"}, %% macro was removed in OTP28
149149
{{0,9,2342,19200300,100,1,1} , "UID"}], %% Not in public_key.hrl
150150
case proplists:lookup(T, Fmts) of
151151
{_, Fmt} ->

deps/rabbitmq_auth_backend_oauth2/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export BUILD_WITHOUT_QUIC
77

88
LOCAL_DEPS = inets public_key
99
BUILD_DEPS = rabbit_common rabbitmq_cli
10-
DEPS = rabbit cowlib jose base64url oauth2_client
11-
TEST_DEPS = cowboy rabbitmq_web_dispatch rabbitmq_ct_helpers rabbitmq_ct_client_helpers amqp_client rabbitmq_web_mqtt emqtt rabbitmq_amqp_client
10+
DEPS = rabbit rabbitmq_mqtt cowlib jose base64url oauth2_client
11+
TEST_DEPS = cowboy rabbitmq_web_dispatch rabbitmq_ct_helpers rabbitmq_ct_client_helpers amqp_client rabbitmq_mqtt rabbitmq_web_mqtt emqtt rabbitmq_amqp_client
1212

1313
PLT_APPS += rabbitmq_cli
1414

deps/rabbitmq_mqtt/src/rabbit_mqtt_processor.erl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,8 @@ vhost_in_username(UserBin) ->
12191219
%% split at the last colon, disallowing colons in username
12201220
case re:split(UserBin, ":(?!.*?:)") of
12211221
[_, _] -> true;
1222-
[UserBin] -> false
1222+
[UserBin] -> false;
1223+
[] -> false
12231224
end
12241225
end.
12251226

@@ -1231,7 +1232,8 @@ get_vhost_username(UserBin) ->
12311232
%% split at the last colon, disallowing colons in username
12321233
case re:split(UserBin, ":(?!.*?:)") of
12331234
[Vhost, UserName] -> {Vhost, UserName};
1234-
[UserBin] -> Default
1235+
[UserBin] -> Default;
1236+
[] -> Default
12351237
end
12361238
end.
12371239

0 commit comments

Comments
 (0)