import ReactMarkdown from "react-markdown"; import { useEffect, useState } from "react"; import { Skeleton } from "@/components/ui/skeleton"; import clientPromise from "@/lib/db"; import Link from "next/link"; interface Bullet { point: string; securityAdvisoryUrl: string; } interface Vulnerabilities { _id: string; version: string; bullets?: Bullet[]; // Make bullets optional } interface ModsVulnerability { _id: string; title: string; slug: string; content: string; vulnerabilities: string; } const Vulnerabilities = async () => { let downloads: Vulnerabilities[] = []; let mods: ModsVulnerability[] = []; let error: Error | null = null; try { const client = await clientPromise; const db = client.db(process.env.MONGODB_DB); downloads = (await db .collection("vulnerabilities") .find() .toArray()) as unknown as Vulnerabilities[]; } catch (err) { error = err as Error; } try { const client = await clientPromise; const db = client.db(process.env.MONGODB_DB); const pages = (await db .collection("pages") .find() .toArray()) as unknown as ModsVulnerability[]; mods = pages.filter( (mod: ModsVulnerability) => mod.vulnerabilities && mod.vulnerabilities.trim() !== "" ); } catch (err) {} const reversedDownloads = [...downloads].reverse(); const reversedMods = [...mods].reverse(); 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@svrjs.org. We'll mitigate that vulnerability if it is possible.

{error &&

{error.message}

}

SVR.JS

{reversedDownloads.map((download) => (

{download.version}

))} {/* Section with MODS content */} {reversedMods.map((mod) => (

{mod.title}

{mod.vulnerabilities && (
{mod.vulnerabilities}
)}
))}
); }; export const dynamic = "force-static"; export default Vulnerabilities;