Merge pull request #196 from MAGICGrants/perk-page-ssrf-fix

fix: prevent ssrf in perk page
This commit is contained in:
Artur
2025-12-10 21:52:20 -03:00
committed by GitHub

View File

@@ -745,6 +745,12 @@ export async function getServerSideProps({ params, req, res }: GetServerSideProp
return { redirect: { destination: `/${params?.fund!}` } }
}
const idRegex = /^[0-9a-z]{24}$/
if (!idRegex.test(`${params?.id!}`)) {
return { redirect: { destination: `/${params?.fund!}/perks` } }
}
try {
const [
balance,