Skip to content

Commit

Permalink
fix(components): close PDF.js vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
Sqrrl committed May 8, 2024
1 parent 4344be8 commit 7d5ea77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/twenty-ads-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@getflip/swirl-components": patch
"@getflip/swirl-components-angular": patch
"@getflip/swirl-components-react": patch
---

Close PDF.js vulnerability (https://github.com/advisories/GHSA-wgrm-67xf-hhpq)
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ export class SwirlFileViewerPdf {
this.doc.destroy();
}

this.doc = await getDocument(this.file).promise;
// Don't remove the isEvalSupported property. https://github.com/advisories/GHSA-wgrm-67xf-hhpq
this.doc = await getDocument({ isEvalSupported: false, url: this.file })
.promise;

const pages = [];

Expand Down

0 comments on commit 7d5ea77

Please sign in to comment.