mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:01:35 +00:00
fix: enforce inbound attachment root policy across pipelines
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { isSafeScpRemoteHost } from "../infra/scp-host.js";
|
||||
import { isValidInboundPathRootPattern } from "../media/inbound-path-policy.js";
|
||||
import {
|
||||
normalizeTelegramCommandDescription,
|
||||
normalizeTelegramCommandName,
|
||||
@@ -819,6 +820,12 @@ export const IMessageAccountSchemaBase = z
|
||||
dmHistoryLimit: z.number().int().min(0).optional(),
|
||||
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
||||
includeAttachments: z.boolean().optional(),
|
||||
attachmentRoots: z
|
||||
.array(z.string().refine(isValidInboundPathRootPattern, "expected absolute path root"))
|
||||
.optional(),
|
||||
remoteAttachmentRoots: z
|
||||
.array(z.string().refine(isValidInboundPathRootPattern, "expected absolute path root"))
|
||||
.optional(),
|
||||
mediaMaxMb: z.number().int().positive().optional(),
|
||||
textChunkLimit: z.number().int().positive().optional(),
|
||||
chunkMode: z.enum(["length", "newline"]).optional(),
|
||||
|
||||
Reference in New Issue
Block a user