mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-22 05:09:12 +00:00
keycloak: URL-encode query parameters for usernames with special characters (#11472)
* fix(keycloak): URL-encode query params for usernames with special chars
get_user_by_username() concatenates the username directly into the URL
query string. When the username contains a +, it is interpreted as a
space by the server, returning no match and causing a TypeError.
Use urllib.parse.quote() (already imported) for the username parameter.
Also replace three fragile .replace(' ', '%20') calls in the authz
search methods with proper quote() calls.
Fixes #10305
* Update changelogs/fragments/keycloak-url-encode-query-params.yml
---------
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| fragments | ||
| .gitignore | ||
| changelog.yaml | ||
| changelog.yaml.license | ||
| config.yaml | ||