From 7e96a57c37dfedb2131800f600ede510e126bb67 Mon Sep 17 00:00:00 2001 From: gotjosh Date: Fri, 8 Nov 2019 15:28:21 +0100 Subject: [PATCH] Fix: URL Encode Groupd IDs for external team sync (#20280) * Fix: URL Encode Group IDs for external team sync External Group IDs can have special characters. Encode them to make them URL-safe. --- public/app/features/teams/state/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/teams/state/actions.ts b/public/app/features/teams/state/actions.ts index cd369b86e92..001a1d1b086 100644 --- a/public/app/features/teams/state/actions.ts +++ b/public/app/features/teams/state/actions.ts @@ -149,7 +149,7 @@ export function addTeamGroup(groupId: string): ThunkResult { export function removeTeamGroup(groupId: string): ThunkResult { return async (dispatch, getStore) => { const team = getStore().team.team; - await getBackendSrv().delete(`/api/teams/${team.id}/groups/${groupId}`); + await getBackendSrv().delete(`/api/teams/${team.id}/groups/${encodeURIComponent(groupId)}`); dispatch(loadTeamGroups()); }; }