"use client"; import ReactMarkdown from "react-markdown"; import { vulnerabilities } from "@/constants/guidelines"; import { useEffect, useState } from "react"; import { Skeleton } from "@/components/ui/skeleton"; interface Bullet { point: string; } interface Vulnerabilities { _id: string; date: string; version: string; bullets?: Bullet[]; // Make bullets optional } const Vulnerabilities = () => { const [loading, setLoading] = useState(true); const [downloads, setDownloads] = useState([]); const [error, setError] = useState(""); const fetchData = async () => { try { const response = await fetch("/api/vulnerabilities", { method: "GET", }); if (response.ok) { const data: Vulnerabilities[] = await response.json(); setDownloads(data); return (document.title = "Vulnerabilities | SVRJS"); } else { throw new Error(`HTTP error! status: ${response.status}`); } } catch (error: any) { setError(error.message || "Failed to fetch downloads"); } finally { setLoading(false); } }; useEffect(() => { fetchData(); const interval = setInterval(() => { fetchData(); }, 10000); return () => clearInterval(interval); }, []); const reversedDownloads = [...downloads].reverse(); // initially loading = true if (loading) { return (
); } return (

SVR.JS Vulnerabilities

Some older versions of SVR.JS are vulnerable to cyberattacks. It's recommended to update your SVR.JS version to the newest one. If you find a security issue with SVR.JS, report it as soon as possible to vulnerability-reports[at]svrjs[dot]org. We'll mitigate that vulnerability if it is possible.

{error &&

{error}

} {reversedDownloads.map((download) => (

{download.version}

    {(download.bullets ?? []).map((bullet, index) => (
  • {bullet.point}
  • ))}
))}
{vulnerabilities}
); }; export default Vulnerabilities;