From a05077952334cf4903b4b7b32afad423ae63b28f Mon Sep 17 00:00:00 2001 From: Ahmad <103906421+ahmadk953@users.noreply.github.com> Date: Sun, 13 Oct 2024 23:42:12 -0400 Subject: [PATCH] Fixed XSS Vulnerability in Image Selector --- components/form/form-picker.tsx | 4 +++- package.json | 2 ++ yarn.lock | 25 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/components/form/form-picker.tsx b/components/form/form-picker.tsx index b14eb1c..1130977 100644 --- a/components/form/form-picker.tsx +++ b/components/form/form-picker.tsx @@ -1,5 +1,6 @@ 'use client'; +import DOMPurify from 'dompurify'; import Image from 'next/image'; import Link from 'next/link'; @@ -90,7 +91,8 @@ export const FormPicker = ({ id, errors }: FormPickerProps) => { )}