datahub icon indicating copy to clipboard operation
datahub copied to clipboard

URL to groups (with special characters) not correctly formed

Open xiphl opened this issue 2 years ago • 1 comments

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:

  1. create a new group via UI that starts with "/" in name and urn
  2. attach group to a dataset
  3. click on group from dataset page
  4. encounter error
  5. click on the newly created group from "groups" page - the link works fine.

Additional context Add any other context about the problem here.

xiphl avatar Nov 22 '22 08:11 xiphl

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

xiphl avatar Nov 22 '22 09:11 xiphl

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

aditya-radhakrishnan avatar Dec 20 '22 17:12 aditya-radhakrishnan