Skip to content

Commit 637a2bc

Browse files
committed
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
1 parent 4b714f4 commit 637a2bc

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
@@ -1226,7 +1226,8 @@ vhost_in_username(UserBin) ->
12261226
%% split at the last colon, disallowing colons in username
12271227
case re:split(UserBin, ":(?!.*?:)") of
12281228
[_, _] -> true;
1229-
[UserBin] -> false
1229+
[UserBin] -> false;
1230+
[] -> false
12301231
end
12311232
end.
12321233

@@ -1238,7 +1239,8 @@ get_vhost_username(UserBin) ->
12381239
%% split at the last colon, disallowing colons in username
12391240
case re:split(UserBin, ":(?!.*?:)") of
12401241
[Vhost, UserName] -> {Vhost, UserName};
1241-
[UserBin] -> Default
1242+
[UserBin] -> Default;
1243+
[] -> Default
12421244
end
12431245
end.
12441246

0 commit comments

Comments
 (0)