Skip to content

🔒(frontend) enhance file download security #889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

PanchoutNathan
Copy link
Contributor

Purpose

Added a safety check for URLs in the FileDownloadButton component. Now, before opening a URL, it verifies if the URL is safe using the isSafeUrl function.
This prevents potentially unsafe URLs from being opened in a new tab.

@PanchoutNathan PanchoutNathan self-assigned this Apr 18, 2025
Copy link
Contributor

@NathanVss NathanVss left a comment

Choose a reason for hiding this comment

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

I approve now as it must pass as a hotfix. But imo we should add all the tests cases that clear the OWASP recommendations

Copy link
Member

@lunika lunika left a comment

Choose a reason for hiding this comment

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

Can you update the changelog please

@PanchoutNathan PanchoutNathan force-pushed the fix/xss-file-download-button branch 5 times, most recently from bb10b34 to f8bd2ce Compare April 23, 2025 06:50
Added a safety check for URLs in the FileDownloadButton component.
Now, before opening a URL, it verifies if the URL is safe using the
isSafeUrl function.
This prevents potentially unsafe URLs from being opened in a new tab
@lunika lunika force-pushed the fix/xss-file-download-button branch from f8bd2ce to 85b699a Compare April 28, 2025 12:37
@lunika lunika enabled auto-merge (squash) April 28, 2025 12:37
@lunika lunika merged commit 9465f1a into main Apr 28, 2025
18 of 19 checks passed
@lunika lunika deleted the fix/xss-file-download-button branch April 28, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants