Skip to content

🔒(frontend) enhance file download security - #889

Merged
lunika merged 1 commit into
mainfrom
fix/xss-file-download-button
Apr 28, 2025
Merged

lunika merged 1 commit into
mainfrom
fix/xss-file-download-button

Conversation

@PanchoutNathan

Copy link
Copy Markdown
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

@NathanVss NathanVss left a comment

Copy link
Copy Markdown
Contributor

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

@lunika lunika left a comment

Copy link
Copy Markdown
Member

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
@lunika
lunika deleted the fix/xss-file-download-button branch April 28, 2025 12:50
This was referenced May 2, 2025
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