fix(security): remediate audit vulnerabilities SEC-001 through SEC-023
This commit is contained in:
1 parent
dc88677169
commit
bd49fbc4a0
31 files changed
+867
-114
No files matched your search
@@ -20,6 +20,7 @@ import {
|
||||
Loader2
|
||||
} from "lucide-react";
|
||||
import { getMediaUrl } from "../lib/media";
|
||||
import DOMPurify from "dompurify";
|
||||
|
||||
interface VideoModalPlayerProps {
|
||||
isOpen: boolean;
|
||||
@@ -306,7 +307,14 @@ export default function VideoModalPlayer({ isOpen, onClose, video }: VideoModalP
|
||||
</button>
|
||||
<div
|
||||
className="w-full h-full [&>iframe]:w-full [&>iframe]:h-full"
|
||||
dangerouslySetInnerHTML={{ __html: video.videoUrl || '' }}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: typeof window !== 'undefined'
|
||||
? DOMPurify.sanitize(video.videoUrl || '', {
|
||||
ALLOWED_TAGS: ['iframe'],
|
||||
ALLOWED_ATTR: ['src', 'width', 'height', 'frameborder', 'allow', 'allowfullscreen', 'title'],
|
||||
})
|
||||
: video.videoUrl || '',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
Reference in new issue
Block a user