Skip to content

Commit

Permalink
apache#43252 Disable extra links button if link is null or empty (apa…
Browse files Browse the repository at this point in the history
…che#43844)

* Disable button if link is null or empty

* Fix space

---------

Co-authored-by: Enis Nazif <[email protected]>
  • Loading branch information
2 people authored and ellisms committed Nov 13, 2024
1 parent 4554490 commit bdfb725
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const ExtraLinks = ({

const isSanitised = (url: string | null) => {
if (!url) {
return true;
return false; // Empty or null urls should cause the link to be disabled
}
const path = new URL(url, "http://localhost");
// Allow Absolute/Relative URL and prevent javascript:() from executing when passed as path.
Expand Down

0 comments on commit bdfb725

Please sign in to comment.