Skip to content

Use string 'true' for the 'exact' query parameter to retrieve users f…#7270

Open
akrist wants to merge 1 commit into
mailcow:stagingfrom
akrist:fix/keycloak-exact-user-query
Open

Use string 'true' for the 'exact' query parameter to retrieve users f…#7270
akrist wants to merge 1 commit into
mailcow:stagingfrom
akrist:fix/keycloak-exact-user-query

Conversation

@akrist

@akrist akrist commented Jun 2, 2026

Copy link
Copy Markdown

Contribution Guidelines

What does this PR include?

Short Description

Problem: The exact parameter value true in the Keycloak user query in keycloak_mbox_login_rest is converted to query parameter 1, which Keycloak interprets as “false”. Keycloak then performs a wildcard search (%$email%) and may return multiple users. This could allow a user to log in to another user’s account using their own password.

keycloak_users_exact_1

Solution:: Change exact parameter value from true (1) to 'true'.

Affected Containers

  • php-fpm-mailcow

Did you run tests?

What did you tested?

IMAP logins using Keycloak users who have set a mailcow_password attribute.

What were the final results? (Awaited, got)

All users were able to log in using their own password.

keycloak_users_exact_true

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.

1 participant