Skip to content

Commit

Permalink
Fixed CapsCSP bug allowing data: URLs to bypass font blocking (thanks…
Browse files Browse the repository at this point in the history
… dcent and skriptimaahinen).
  • Loading branch information
hackademix committed Mar 1, 2020
1 parent acddfd8 commit 8f2f845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/CapsCSP.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function CapsCSP(baseCSP = new CSP()) {
return Object.assign(baseCSP, {
types: ["script", "object", "media"],
types: ["script", "object", "media", "font"],
dataUriTypes: ["font", "media", "object"],
buildFromCapabilities(capabilities, blockHttp = false) {
let forbidData = new Set(this.dataUriTypes.filter(t => !capabilities.has(t)));
Expand Down

0 comments on commit 8f2f845

Please sign in to comment.