mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-30 20:50:23 +00:00
fix(telegram): trust local bot api media roots
This commit is contained in:
@@ -229,6 +229,8 @@ export type TelegramAccountConfig = {
|
||||
ackReaction?: string;
|
||||
/** Custom Telegram Bot API root URL (e.g. "https://my-proxy.example.com" or a local Bot API server). */
|
||||
apiRoot?: string;
|
||||
/** Trusted local filesystem roots for self-hosted Telegram Bot API absolute file_path values. */
|
||||
trustedLocalFileRoots?: string[];
|
||||
/** Auto-rename DM forum topics on first message using LLM. Default: true. */
|
||||
autoTopicLabel?: AutoTopicLabelConfig;
|
||||
};
|
||||
|
||||
@@ -298,6 +298,12 @@ export const TelegramAccountSchemaBase = z
|
||||
errorPolicy: TelegramErrorPolicySchema,
|
||||
errorCooldownMs: z.number().int().nonnegative().optional(),
|
||||
apiRoot: z.string().url().optional(),
|
||||
trustedLocalFileRoots: z
|
||||
.array(z.string())
|
||||
.optional()
|
||||
.describe(
|
||||
"Trusted local filesystem roots for self-hosted Telegram Bot API absolute file_path values. Only absolute paths under these roots are read directly; all other absolute paths are rejected.",
|
||||
),
|
||||
autoTopicLabel: AutoTopicLabelSchema,
|
||||
})
|
||||
.strict();
|
||||
|
||||
Reference in New Issue
Block a user