You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
kcreg can target the wrong client when a client ID contains spaces #55551
The Keycloak Client Registration CLI (kcreg) uses form encoding for client IDs in URL path segments. When an ID contains a space, the CLI sends a literal + in the request path. The server can fail to find the requested client or resolve a different client. This affects get, delete, and the read and write requests in merge-mode update.
Version
Verified in Keycloak 26.8.2 using the compiled keycloak-admin-cli module and a local HTTP test server.
Expected behavior
The CLI should encode client IDs as URL path segments so that each request targets the exact ID supplied by the caller.
Actual behavior
The local HTTP test server received a literal + in the URL path where the supplied client ID contained a space. The Keycloak server applies its normal authorization checks to whichever client the request resolves.
How to Reproduce?
Use a local HTTP test server to capture the request path for a kcreg get request with a test client ID containing a space.
Check how the space is encoded. The request path contains + where it should contain %20.
This issue was originally tracked in the private repository. Migrated by @Pepo48.
Activity