Fix removing groups that have a slash in the name (#18228)

Fix removing groups that have a slash in the name
This commit is contained in:
John Molakvoæ 2019-12-05 08:18:54 +01:00 committed by GitHub
commit c3d223fa58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 1 deletions

View file

@ -320,7 +320,7 @@ const actions = {
*/
removeGroup(context, gid) {
return api.requireAdmin().then((response) => {
return api.delete(OC.linkToOCS(`cloud/groups/${gid}`, 2))
return api.delete(OC.linkToOCS(`cloud/groups/${encodeURIComponent(gid)}`, 2))
.then((response) => context.commit('removeGroup', gid))
.catch((error) => { throw error })
}).catch((error) => context.commit('API_FAILURE', { gid, error }))