-
-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
603 additions
and
407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ The security policy covers the codebase and documentation of the open source pro | |
|
||
## Vulnerability Disclosure Process | ||
|
||
The project will provide a dedicated email address ([email protected]) for submitting vulnerability reports related to the [Linkshub](https://linkshub.vercel.app/) website or any of the linked websites. Vulnerability reports will be reviewed and triaged by the project's maintainers. The owner will aim to respond to vulnerability reports within 72 hours, and will provide regular updates on the status of the vulnerability and any remediation efforts. | ||
The project will provide a dedicated email address ([email protected]) for submitting vulnerability reports related to the [Linkshub](https://linkshub.vercel.app/) website or any of the linked websites. Vulnerability reports will be reviewed and triaged by the project's maintainers. The owner will aim to respond to vulnerability reports within 72 hours and will provide regular updates on the status of the vulnerability and any remediation efforts. | ||
|
||
## Roles and Responsibilities | ||
|
||
|
@@ -22,15 +22,15 @@ LinksHub will aim to resolve critical vulnerabilities within 30 days and non-cri | |
|
||
## Secure Coding Practices | ||
|
||
LinksHub will provide guidance on secure coding practices for contributors, including guidelines for input validation, authentication, authorization, and data protection. | ||
LinksHub will guide secure coding practices for contributors, including guidelines for input validation, authentication, authorization, and data protection. | ||
|
||
## Regular Review and Update | ||
|
||
The security policy will be regularly reviewed and updated to ensure that it remains effective and relevant. The maintainers will evaluate the vulnerability disclosure process, update secure coding guidelines, and revise the response timeline as needed. | ||
|
||
## Disclosure Policy | ||
|
||
LinksHub will follow a coordinated disclosure policy, which means that vulnerabilities will be disclosed publicly only after they have been remediated. The project may work with external website owners to coordinate disclosure of vulnerabilities that affect their websites. | ||
LinksHub will follow a coordinated disclosure policy, which means that vulnerabilities will be disclosed publicly only after they have been remediated. The project may work with external website owners to coordinate the disclosure of vulnerabilities that affect their websites. | ||
|
||
## Legal Disclaimer | ||
|
||
|
@@ -40,4 +40,4 @@ The security policy includes a legal disclaimer that limits the liability of the | |
|
||
If you have any questions or concerns about the security policy or any security vulnerabilities in the project, please contact us at _[email protected]_. | ||
|
||
By implementing this security policy, we aim to ensure that vulnerabilities are addressed in a timely manner, and that users and contributors can use [Linkshub](https://linkshub.vercel.app/) and its linked sources safely and securely. | ||
By implementing this security policy, we aim to ensure that vulnerabilities are addressed promptly and that users and contributors can use [Linkshub](https://linkshub.vercel.app/) and its linked sources safely and securely. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,56 @@ | ||
import useCopyToClipboard from 'hooks/useCopyToClipboard' | ||
import React from 'react' | ||
import { FaRegCopy } from 'react-icons/fa' | ||
import { Tooltip } from 'react-tooltip' | ||
import useCopyToClipboard from "hooks/useCopyToClipboard"; | ||
import React from "react"; | ||
import { FaRegCopy, FaCheckSquare } from "react-icons/fa"; | ||
import { Tooltip } from "react-tooltip"; | ||
|
||
type CopyToClipboardProps = { | ||
url: string | ||
} | ||
url: string; | ||
}; | ||
|
||
export const CopyToClipboard = ({ url }: CopyToClipboardProps): JSX.Element => { | ||
const [copyToClipboard, { success }] = useCopyToClipboard() | ||
const [copyToClipboard, { success }] = useCopyToClipboard(); | ||
|
||
function handleCopy(e: React.MouseEvent<SVGElement, MouseEvent>) { | ||
e.stopPropagation() | ||
copyToClipboard(url) | ||
e.stopPropagation(); | ||
copyToClipboard(url); | ||
} | ||
|
||
return ( | ||
<div | ||
className="dropdown dropdown-left dropdown-hover"> | ||
<div style={{ position: 'relative' }}> | ||
<button data-tooltip-id="copy-tooltip" data-tooltip-content={success ? 'Copied!' : 'Copy'} data-tooltip-place="top"> | ||
<FaRegCopy | ||
size={'1.3rem'} | ||
className="text-theme-primary cursor-pointer" | ||
onClick={(e) => handleCopy(e)} | ||
/> | ||
<div className="dropdown dropdown-left dropdown-hover"> | ||
<div style={{ position: "relative" }}> | ||
<button | ||
data-tooltip-id="copy-tooltip" | ||
data-tooltip-content={success ? "Copied!" : "Copy"} | ||
data-tooltip-place="top" | ||
> | ||
{success ? ( // Render the FaCheckSquare icon if success is true | ||
<FaCheckSquare | ||
size={"1.3rem"} | ||
className="text-theme-primary cursor-pointer" | ||
onClick={(e) => handleCopy(e)} | ||
aria-label="Link copied" // Add aria-label for accessibility | ||
/> | ||
) : ( | ||
<FaRegCopy // Otherwise, render the default FaRegCopy icon | ||
size={"1.3rem"} | ||
className="text-theme-primary cursor-pointer" | ||
onClick={(e) => handleCopy(e)} | ||
aria-label="Copy link to clipboard" // Add aria-label for accessibility | ||
/> | ||
)} | ||
</button> | ||
<Tooltip id='copy-tooltip' style={{ backgroundColor: '#8b5cf6', fontSize: '13px', paddingLeft: '6px', paddingRight: '6px', paddingTop: '2px', paddingBottom: '2px' }} /> | ||
<Tooltip | ||
id="copy-tooltip" | ||
style={{ | ||
backgroundColor: "#8b5cf6", | ||
fontSize: "13px", | ||
paddingLeft: "6px", | ||
paddingRight: "6px", | ||
paddingTop: "2px", | ||
paddingBottom: "2px", | ||
}} | ||
/> | ||
</div> | ||
</div> | ||
) | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
interface ErrorMessageProps { | ||
children: React.ReactNode | ||
className?: string | undefined | ||
} | ||
|
||
export const ErrorMessage: React.FC<ErrorMessageProps> = ({ | ||
children, | ||
className, | ||
}) => { | ||
const defaultClasses = 'text-red-500 mt-2' | ||
const classes = defaultClasses + ' ' + (className ?? '') | ||
|
||
return <p className={classes}>{children}</p> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.