tighten permission checks and input validation across the api

This commit is contained in:
Jarek Krochmalski committed 2026-09-02 15:52:44 +02:00
1 parent 77686da02a
commit 5af4e69eb2
47 files changed
+721 -225

No files matched your search

@@ -21,6 +21,8 @@ import { isProtectedPath } from '$lib/server/fs-guard';
export const GET: RequestHandler = async ({ url, cookies }) => {
const auth = await authorize(cookies);
// Loading a stack's own compose/.env for editing needs stacks:edit; host and
// Dockhand secrets are kept unreadable regardless via isProtectedPath below.
if (auth.authEnabled && !await auth.can('stacks', 'edit')) {
return json({ error: 'Permission denied' }, { status: 403 });
}