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

Allow data URI's for image sources and font sources #5131

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

aptkingston
Copy link
Member

Description

This PR fixes some of the CSP schemes to allow local data: URI's. These were lacking the colon suffix which meant images using data URI's (and fonts, but don't think they're used) would not work.

Fixes #5127.

Copy link
Member

@shogunpurple shogunpurple left a comment

Choose a reason for hiding this comment

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

LGTM!

@shogunpurple
Copy link
Member

Been thinking we should probably just open it up a bit for fonts as well - possibly just allow all

@codecov-commenter
Copy link

Codecov Report

Merging #5131 (334e416) into master (fc00192) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #5131   +/-   ##
=======================================
  Coverage   68.75%   68.75%           
=======================================
  Files         146      146           
  Lines        5054     5054           
  Branches      773      773           
=======================================
  Hits         3475     3475           
  Misses       1121     1121           
  Partials      458      458           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c13a6db...334e416. Read the comment docs.

@aptkingston
Copy link
Member Author

You say that but I do remember really old exploits with certain TTFs on windows haha. So it's not 100% safe. But in practice yea, I think that would also be a good idea.

@aptkingston aptkingston merged commit 5cac7bd into master Mar 28, 2022
@aptkingston aptkingston deleted the fix/data-uri-csp branch March 28, 2022 16:03
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants