Skip to content
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

fix(utils): improve svg security #342

Merged
merged 7 commits into from
Jun 7, 2022
Merged

Conversation

TremayneChrist
Copy link
Collaborator

Adds patch to strip event attributes from any SVG body

fix(svg-loader): use responseXML for added security
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 1, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 87aff94
Status: ✅  Deploy successful!
Preview URL: https://a4a3c522.refinitiv-ui.pages.dev

View logs

@TremayneChrist
Copy link
Collaborator Author

I've removed the previous code duplication and shifted logic into a separate SVGLoader, keeping the separate Flag/Icon loaders for preload logic.

Using @goremikins suggestion of responseXML, fixes the final known security flaw.

@TremayneChrist TremayneChrist requested a review from wsuwt June 1, 2022 10:30
goremikins
goremikins previously approved these changes Jun 1, 2022
@TremayneChrist TremayneChrist changed the title fix(cdn-loader): improve svg security fix(utils): improve svg security Jun 2, 2022
@sonarcloud
Copy link

sonarcloud bot commented Jun 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@dtanp-rft
Copy link
Collaborator

Bangkok team has already tried to hack the code but nobody is succeeding. I think we can merge this.

@dtanp-rft dtanp-rft merged commit ef53c5c into v6 Jun 7, 2022
@bualoy-napat bualoy-napat deleted the fix/improve-loader-security branch October 18, 2022 07:51
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.

4 participants