From 2e931a0ee1a0472d0ef9191e5e3f3609e8efd408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agn=C3=A8s=20Toulet?= <35176601+AgnesToulet@users.noreply.github.com> Date: Thu, 23 Jul 2020 12:42:30 +0200 Subject: [PATCH] LDAP: fix LDAP test with special chars in username (#26539) --- public/app/features/admin/state/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/admin/state/actions.ts b/public/app/features/admin/state/actions.ts index 1f302144e82..83456eaf12e 100644 --- a/public/app/features/admin/state/actions.ts +++ b/public/app/features/admin/state/actions.ts @@ -211,7 +211,7 @@ export function loadLdapState(): ThunkResult { export function loadUserMapping(username: string): ThunkResult { return async dispatch => { try { - const response = await getBackendSrv().get(`/api/admin/ldap/${username}`); + const response = await getBackendSrv().get(`/api/admin/ldap/${encodeURIComponent(username)}`); const { name, surname, email, login, isGrafanaAdmin, isDisabled, roles, teams } = response; const userInfo: LdapUser = { info: { name, surname, email, login },