diff --git a/openbas-front/package.json b/openbas-front/package.json index b71cf564ac..1a2c6aa11f 100644 --- a/openbas-front/package.json +++ b/openbas-front/package.json @@ -32,7 +32,7 @@ "cronstrue": "2.51.0", "d3-hierarchy": "3.1.2", "date-fns": "4.1.0", - "dompurify": "3.1.6", + "dompurify": "3.2.3", "elkjs": "0.9.3", "final-form": "4.20.10", "final-form-arrays": "3.1.0", diff --git a/openbas-front/src/admin/components/simulations/simulation/mails/Communication.js b/openbas-front/src/admin/components/simulations/simulation/mails/Communication.js index 44356cb3a5..45edfc6786 100644 --- a/openbas-front/src/admin/components/simulations/simulation/mails/Communication.js +++ b/openbas-front/src/admin/components/simulations/simulation/mails/Communication.js @@ -2,7 +2,7 @@ import { AttachFileRounded, ExpandLess, ExpandMore } from '@mui/icons-material'; import { Avatar, Button, Card, CardContent, CardHeader, IconButton } from '@mui/material'; import { lightBlue } from '@mui/material/colors'; import { makeStyles, useTheme } from '@mui/styles'; -import DOMPurify from 'dompurify'; +import purify from 'dompurify'; import parse from 'html-react-parser'; import { useState } from 'react'; @@ -134,8 +134,8 @@ const Communication = (props) => { {isHtml ? (
{expand - ? parse(DOMPurify.sanitize(content)) - : parse(DOMPurify.sanitize(truncate(content, limit)))} + ? parse(purify.sanitize(content)) + : parse(purify.sanitize(truncate(content, limit)))}
) : (
diff --git a/openbas-front/yarn.lock b/openbas-front/yarn.lock index c93ab129e6..dd7466c8dd 100644 --- a/openbas-front/yarn.lock +++ b/openbas-front/yarn.lock @@ -3182,6 +3182,13 @@ __metadata: languageName: node linkType: hard +"@types/trusted-types@npm:^2.0.7": + version: 2.0.7 + resolution: "@types/trusted-types@npm:2.0.7" + checksum: 10c0/4c4855f10de7c6c135e0d32ce462419d8abbbc33713b31d294596c0cc34ae1fa6112a2f9da729c8f7a20707782b0d69da3b1f8df6645b0366d08825ca1522e0c + languageName: node + linkType: hard + "@types/unist@npm:*, @types/unist@npm:^3.0.0": version: 3.0.3 resolution: "@types/unist@npm:3.0.3" @@ -4989,10 +4996,15 @@ __metadata: languageName: node linkType: hard -"dompurify@npm:3.1.6": - version: 3.1.6 - resolution: "dompurify@npm:3.1.6" - checksum: 10c0/3de1cca187c78d3d8cb4134fc2985b644d6a81f6b4e024c77cfb04c1c2f38544ccf7b0ea37a48ce22fcca64594170ed7c22252574c75b801c44345cdd7b06c64 +"dompurify@npm:3.2.3": + version: 3.2.3 + resolution: "dompurify@npm:3.2.3" + dependencies: + "@types/trusted-types": "npm:^2.0.7" + dependenciesMeta: + "@types/trusted-types": + optional: true + checksum: 10c0/0ce5cb89b76f396d800751bcb48e0d137792891d350ccc049f1bc9a5eca7332cc69030c25007ff4962e0824a5696904d4d74264df9277b5ad955642dfb6f313f languageName: node linkType: hard @@ -8954,7 +8966,7 @@ __metadata: cross-env: "npm:7.0.3" d3-hierarchy: "npm:3.1.2" date-fns: "npm:4.1.0" - dompurify: "npm:3.1.6" + dompurify: "npm:3.2.3" elkjs: "npm:0.9.3" esbuild: "npm:0.24.0" eslint: "npm:9.15.0"