mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-09-12 19:51:00 +05:00
fix(security): stop user-supplied certificatePath in create schema
Same drizzle-zod $defaultFn-as-optional leak as schedule appName: certificatePath (notNull + $defaultFn) was overridable, enabling path traversal out of the certs dir even with the escaped shell paths. Omit it from apiCreateCertificate so it is always server-generated (completes GHSA-q9qw).
This commit is contained in:
parent
6943a395fe
commit
fbf2ff73c2
@ -45,7 +45,7 @@ export const apiCreateCertificate = createInsertSchema(certificates, {
|
||||
privateKey: z.string().min(1),
|
||||
autoRenew: z.boolean().optional(),
|
||||
serverId: z.string().optional(),
|
||||
});
|
||||
}).omit({ certificatePath: true });
|
||||
|
||||
export const apiFindCertificate = z.object({
|
||||
certificateId: z.string().min(1),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user