Skip to content

RabbitMQ: Only set the AuthMechanisms when UseExternalAuthMechanism is set to true#5416

Merged
danielmarbach merged 1 commit intomasterfrom
rabbitmq-auth
Apr 13, 2026
Merged

RabbitMQ: Only set the AuthMechanisms when UseExternalAuthMechanism is set to true#5416
danielmarbach merged 1 commit intomasterfrom
rabbitmq-auth

Conversation

@danielmarbach
Copy link
Copy Markdown
Contributor

@danielmarbach danielmarbach commented Apr 13, 2026

}

if (dictionary.TryGetValue("UseExternalAuthMechanism", out var useExternalAuthMechanismString))
if (dictionary.TryGetValue("UseExternalAuthMechanism", out var useExternalAuthMechanismString) && bool.TryParse(useExternalAuthMechanismString, out var useExternalAuthMechanism) && useExternalAuthMechanism)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If parsing fails, there should be an exception as that means there was a typo unless the values in the dictionary have already been format validated.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of the code uses TryParse too. I'm trying to make a minimal fix here.

@danielmarbach danielmarbach merged commit 4485cea into master Apr 13, 2026
63 of 64 checks passed
@danielmarbach danielmarbach deleted the rabbitmq-auth branch April 13, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants