Skip to content

Make sure group management works with all types of group names - #20035

Merged
skjnldsv merged 3 commits into
masterfrom
bugfix/group-encode
Apr 11, 2020
Merged

Make sure group management works with all types of group names#20035
skjnldsv merged 3 commits into
masterfrom
bugfix/group-encode

Conversation

@juliusknorr

Copy link
Copy Markdown
Member

Group ids currently don't have any character limitations, which means that you can create groups like "Department A/B" which will fail on both the provisioning API as well as the routes provided by our user management.

This PR ensures that all group ids are encoded and properly handled by both the backend and the frontend then.

I'm not to happy about the double encoding here, but this is the only way that we can keep the groupId as part of the URL without making it a query parameter and therefore breaking the provisioning api.

In general I would prefer to add some character limitation to the group id, similar to how we do it for the user id, where / is blocked, but that would still leave us with instances that might have those broken ids.

@juliusknorr

Copy link
Copy Markdown
MemberAuthor

cc @rullzer@GretaD for review since it also fails for me to request that now.

@skjnldsv

Copy link
Copy Markdown
Member

Maybe add some phpunit testing? 🙈

@juliusknorr

Copy link
Copy Markdown
MemberAuthor

Yeah, I'll do that. Anyone has concerns/ideas regarding the double encoding?

@skjnldsv

Copy link
Copy Markdown
Member

Looks sane to me

@gary-kim

gary-kim commented Mar 30, 2020

Copy link
Copy Markdown
Member

Yeah, I'll do that. Anyone has concerns/ideas regarding the double encoding?

Not a fan but if it works...then great!

@juliusknorr

Copy link
Copy Markdown
MemberAuthor

Added some test cases 😉

@juliusknorr

Copy link
Copy Markdown
MemberAuthor

/backport to stable18

@juliusknorr
juliusknorr requested a review from rullzerApril 2, 2020 17:39
@rullzerrullzer mentioned this pull request Apr 4, 2020
80 tasks
@juliusknorr

Copy link
Copy Markdown
MemberAuthor

Rebased and ready for review.

@GretaDGretaD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and works 👍

@GretaD
GretaDforce-pushed the bugfix/group-encode branch from 57be87e to 7811c8dCompareApril 9, 2020 09:26
@juliusknorr
juliusknorrforce-pushed the bugfix/group-encode branch 2 times, most recently from ccea55c to 3ec9a01CompareApril 9, 2020 09:44
@blizzzblizzz added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Apr 9, 2020
@rullzerrullzer mentioned this pull request Apr 9, 2020
59 tasks
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@skjnldsv
skjnldsvforce-pushed the bugfix/group-encode branch from 3ec9a01 to db90023CompareApril 11, 2020 06:28
@skjnldsv

Copy link
Copy Markdown
Member

/compile amend /

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable18 in #20433 with conflicts ⚠️

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishbugfeature: users and groups

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@juliusknorr@skjnldsv@gary-kim@GretaD@blizzz