Enforce serverside check of specified punishment type
This commit is contained in:
@ -45,6 +45,9 @@ export async function onRequestPost(context: RequestContext) {
|
|||||||
if (!precheckData.can_appeal)
|
if (!precheckData.can_appeal)
|
||||||
return jsonError(precheckData.reason as string, 400);
|
return jsonError(precheckData.reason as string, 400);
|
||||||
|
|
||||||
|
if (!precheckData.types?.includes(type))
|
||||||
|
return jsonError("Specified punishment type is not applicable", 400);
|
||||||
|
|
||||||
const appealId = `${id}${
|
const appealId = `${id}${
|
||||||
context.request.headers.get("cf-ray")?.split("-")[0]
|
context.request.headers.get("cf-ray")?.split("-")[0]
|
||||||
}${Date.now()}`;
|
}${Date.now()}`;
|
||||||
|
Reference in New Issue
Block a user