Skip to content

Commit 1869219

Browse files
Chore: Update dompurify to fix CVE (#614)
* update cve * remove libraries chromium has
1 parent bbd464c commit 1869219

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@hapi/boom": "^10.0.0",
3131
"@puppeteer/browsers": "^2.3.1",
3232
"chokidar": "^3.5.2",
33-
"dompurify": "^2.5.4",
33+
"dompurify": "^3.2.4",
3434
"express": "^4.21.1",
3535
"express-prom-bundle": "^6.5.0",
3636
"jimp": "^0.22.12",
@@ -49,7 +49,7 @@
4949
},
5050
"devDependencies": {
5151
"@grafana/eslint-config": "^6.0.0",
52-
"@types/dompurify": "2.3.4",
52+
"@types/dompurify": "^3.2.0",
5353
"@types/express": "^4.17.14",
5454
"@types/jest": "^29.5.12",
5555
"@types/jsdom": "20.0.0",

Diff for: src/sanitizer/Sanitizer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const svgTags = {
4545
const svgFilePrefix = '<?xml version="1.0" encoding="utf-8"?>';
4646

4747
export class Sanitizer {
48-
constructor(private domPurify: DOMPurify.DOMPurifyI) {}
48+
constructor(private domPurify: DOMPurify.DOMPurify) {}
4949

5050
private sanitizeUseTagHook = (node) => {
5151
if (node.nodeName === 'use') {

Diff for: yarn.lock

+12-10
Original file line numberDiff line numberDiff line change
@@ -1175,12 +1175,12 @@
11751175
resolved "https://registry.yarnpkg.com/@types/cookiejar/-/cookiejar-2.1.5.tgz#14a3e83fa641beb169a2dd8422d91c3c345a9a78"
11761176
integrity sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==
11771177

1178-
"@types/dompurify@2.3.4":
1179-
version "2.3.4"
1180-
resolved "https://registry.yarnpkg.com/@types/dompurify/-/dompurify-2.3.4.tgz#94e997e30338ea24d4c8d08beca91ce4dd17a1b4"
1181-
integrity sha512-EXzDatIb5EspL2eb/xPGmaC8pePcTHrkDCONjeisusLFrVfl38Pjea/R0YJGu3k9ZQadSvMqW0WXPI2hEo2Ajg==
1178+
"@types/dompurify@^3.2.0":
1179+
version "3.2.0"
1180+
resolved "https://registry.yarnpkg.com/@types/dompurify/-/dompurify-3.2.0.tgz#56610bf3e4250df57744d61fbd95422e07dfb840"
1181+
integrity sha512-Fgg31wv9QbLDA0SpTOXO3MaxySc4DKGLi8sna4/Utjo4r3ZRPdCt4UQee8BWr+Q5z21yifghREPJGYaEOEIACg==
11821182
dependencies:
1183-
"@types/trusted-types" "*"
1183+
dompurify "*"
11841184

11851185
"@types/express-serve-static-core@^4.17.33":
11861186
version "4.19.6"
@@ -1365,7 +1365,7 @@
13651365
resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.5.tgz#74fef9ffbaa198eb8b588be029f38b00299caa2c"
13661366
integrity sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==
13671367

1368-
"@types/trusted-types@*":
1368+
"@types/trusted-types@^2.0.7":
13691369
version "2.0.7"
13701370
resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.7.tgz#baccb07a970b91707df3a3e8ba6896c57ead2d11"
13711371
integrity sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==
@@ -2692,10 +2692,12 @@ domexception@^4.0.0:
26922692
dependencies:
26932693
webidl-conversions "^7.0.0"
26942694

2695-
dompurify@^2.5.4:
2696-
version "2.5.8"
2697-
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.5.8.tgz#2809d89d7e528dc7a071dea440d7376df676f824"
2698-
integrity sha512-o1vSNgrmYMQObbSSvF/1brBYEQPHhV1+gsmrusO7/GXtp1T9rCS8cXFqVxK/9crT1jA6Ccv+5MTSjBNqr7Sovw==
2695+
dompurify@*, dompurify@^3.2.4:
2696+
version "3.2.4"
2697+
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.2.4.tgz#af5a5a11407524431456cf18836c55d13441cd8e"
2698+
integrity sha512-ysFSFEDVduQpyhzAob/kkuJjf5zWkZD8/A9ywSp1byueyuCfHamrCBa14/Oc2iiB0e51B+NpxSl5gmzn+Ms/mg==
2699+
optionalDependencies:
2700+
"@types/trusted-types" "^2.0.7"
26992701

27002702
dunder-proto@^1.0.0, dunder-proto@^1.0.1:
27012703
version "1.0.1"

0 commit comments

Comments
 (0)