datahub
datahub copied to clipboard
URL to groups (with special characters) not correctly formed
I have groups retrieved from OIDC with names that start with "/", ie "/something/something1/something2". When adding the group to an asset via UI, the URL that links back to the group is incorrect, ie urn:li:corpGroup/something/something1/something2 and it results in error page instead.
To Reproduce in demo site Steps to reproduce the behavior:
- create a new group via UI that starts with "/" in name and urn
- attach group to a dataset
- click on group from dataset page
- encounter error
- click on the newly created group from "groups" page - the link works fine.
Additional context Add any other context about the problem here.
the line responsible for creating the hyperlink in dataset ownership view: https://github.com/datahub-project/datahub/blob/10a31b1aa08138c616c0e44035f8f843bef13085/datahub-web-react/src/app/entity/shared/components/styled/ExpandedOwner.tsx#L91
whereas the url in groups overview was formed by: https://github.com/datahub-project/datahub/blob/10a31b1aa08138c616c0e44035f8f843bef13085/datahub-web-react/src/app/entity/user/UserGroups.tsx#L102 is properly encoded
Thanks for reporting this @xiphl ! This has been solved with this PR being merged https://github.com/datahub-project/datahub/pull/6814
Really appreciate you noticing this bug and posting it here