Harden dashboard security surfaces

This commit is contained in:
Codex
2026-04-25 03:00:13 +00:00
parent 28dfa3074c
commit 5fc2ea78de
11 changed files with 323 additions and 172 deletions
@@ -1,5 +1,5 @@
import { NextResponse } from "next/server"
import { uploadSandboxFile } from "@/app/lib/sandboxFiles"
import { assertRequestContentLength, uploadSandboxFile } from "@/app/lib/sandboxFiles"
export async function POST(
request: Request,
@@ -7,6 +7,7 @@ export async function POST(
) {
try {
const { sandboxId } = await params
assertRequestContentLength(request)
const form = await request.formData()
const file = form.get("file")
const rawPath = form.get("path")
+2 -1
View File
@@ -1,5 +1,5 @@
import { NextResponse } from "next/server"
import { restoreSandboxArchive } from "@/app/lib/sandboxFiles"
import { assertRequestContentLength, restoreSandboxArchive } from "@/app/lib/sandboxFiles"
import { recordActivity } from "@/app/lib/activityLog"
export async function POST(
@@ -8,6 +8,7 @@ export async function POST(
) {
try {
const { sandboxId } = await params
assertRequestContentLength(request)
const form = await request.formData()
const file = form.get("archive")
const rawTargetPath = form.get("targetPath")