Skip to content

Conversation

ahussein3
Copy link
Contributor

@ahussein3 ahussein3 commented Oct 2, 2022

Resolve #1558 1588

  • Refactor all anchors to use Link component instead to make sure all Urls used are safe valid Urls.

@ahussein3 ahussein3 added the enhancement New feature or request label Oct 2, 2022
@ahussein3 ahussein3 requested a review from jpellizzari as a code owner October 2, 2022 15:14
@ahussein3 ahussein3 requested review from foot and AlinaGoaga October 2, 2022 15:24
Copy link
Contributor

@AlinaGoaga AlinaGoaga left a comment

Choose a reason for hiding this comment

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

Looks good to me! We've got a few more places which have got a tags (like in Delete Cluster, App Fields etc) so I'll leave this open for now maybe we add those also? Cheers!

@ahussein3 ahussein3 requested a review from AlinaGoaga October 9, 2022 10:28
@AlinaGoaga
Copy link
Contributor

AlinaGoaga commented Oct 10, 2022

Hey @ahussein3! I think we're good to remove isAllowedLink altogether from where it's used as the Link component coming from Core already does the checks?

function Link({
  ...props
}: Props) {
  if (href && !isAllowedLink(href)) {
    return <Text {...textProps}>{children}</Text>;
  }

@ahussein3 ahussein3 merged commit 87fd905 into main Oct 10, 2022
@ahussein3 ahussein3 deleted the Ui-1558-UseLinkInsteadOfAnchorToMakeSureAllUrlAreSafe branch October 10, 2022 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UI] Make sure we're using the Link component from core everywhere which provides XSS attack prevention
2 participants