From d090adc1f12c5fdf5d076d6c0e244f00648f77f1 Mon Sep 17 00:00:00 2001 From: wvffle Date: Fri, 1 Jul 2022 13:55:13 +0000 Subject: [PATCH] Sanitize html --- front/package.json | 2 ++ front/src/components/AboutPod.vue | 16 ++++++--------- front/src/components/Home.vue | 4 ++-- front/src/components/SanitizedHtml.vue | 20 +++++++++++++++++++ front/src/components/auth/Plugin.vue | 20 +++++++++---------- front/src/components/common/ContentForm.vue | 4 ++-- .../components/common/RenderedDescription.vue | 2 +- front/src/components/library/TrackBase.vue | 4 ++-- .../manage/moderation/InstancePolicyCard.vue | 2 +- .../manage/moderation/NotesThread.vue | 2 +- .../manage/moderation/ReportCard.vue | 2 +- .../notifications/NotificationRow.vue | 9 +++++---- front/src/init/globalComponents.ts | 2 ++ front/src/views/Notifications.vue | 2 +- front/src/views/admin/ChannelDetail.vue | 5 ++++- front/src/views/admin/library/AlbumDetail.vue | 5 ++++- .../src/views/admin/library/ArtistDetail.vue | 5 ++++- front/src/views/admin/library/TrackDetail.vue | 5 ++++- front/yarn.lock | 14 ++++++++++++- yarn.lock | 4 ++++ 20 files changed, 89 insertions(+), 40 deletions(-) create mode 100644 front/src/components/SanitizedHtml.vue create mode 100644 yarn.lock diff --git a/front/package.json b/front/package.json index d000e7b3e..d504ea0e0 100644 --- a/front/package.json +++ b/front/package.json @@ -23,6 +23,7 @@ "axios": "0.27.2", "axios-auth-refresh": "3.3.1", "diff": "5.1.0", + "dompurify": "^2.3.8", "focus-trap": "6.9.4", "fomantic-ui-css": "2.8.8", "howler": "2.2.3", @@ -50,6 +51,7 @@ "vuex-router-sync": "5.0.0" }, "devDependencies": { + "@types/dompurify": "^2.3.3", "@types/jest": "28.1.3", "@types/jquery": "3.5.14", "@types/lodash-es": "4.17.6", diff --git a/front/src/components/AboutPod.vue b/front/src/components/AboutPod.vue index 4c3d0dfdd..30f9c5b19 100644 --- a/front/src/components/AboutPod.vue +++ b/front/src/components/AboutPod.vue @@ -1,6 +1,3 @@ -