-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix listing users in groups with slash in the name #18462
Conversation
Signed-off-by: Gary Kim <gary@garykim.dev>
@@ -205,7 +205,7 @@ const actions = { | |||
search = typeof search === 'string' ? search : '' | |||
group = typeof group === 'string' ? group : '' | |||
if (group !== '') { | |||
return api.get(OC.linkToOCS(`cloud/groups/${group}/users/details?offset=${offset}&limit=${limit}&search=${search}`, 2)) | |||
return api.get(OC.linkToOCS(`cloud/groups/${encodeURIComponent(group)}/users/details?offset=${offset}&limit=${limit}&search=${search}`, 2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on a related note: shouldn't we also encode search
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be a good idea. For now, I believe the allowed characters in usernames means you shouldn't have a username with a character that needs to be encoded. I'll take a look when I've got a moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense! Thanks!
Still had the groups with
/
in the name from working on #18228 and noticed while messing with the users list that listing groups with/
in the name also causes an error.This should fix that.