feat(附件): 增加请求级文本读取与上传代理
支持任意 POST 路径的 multipart 暂存、原始字节转发和 TXT、DOCX、DOC 文本提取;通过 host.files.read_text 提供请求内受限读取,禁止插件改写附件和上传正文。 增加附件数量、文本、解压、超时和读取次数限制,覆盖断开、异常及清理场景;补充依赖、LibreOffice 镜像安装和插件接口文档,不修改业务 Lua 插件。 验证:全量测试 128 通过、2 个既有失败、1 个跳过;既有失败为 test_example_redacts_cross_event_phone 和 test_network_example_uses_configuration_and_http_result,均缺少插件必填配置。Ruff 静态检查、改动文件格式检查、pip check 和差异检查通过;全仓格式检查保留两处既有问题。当前环境缺少 LibreOffice 和 Docker,真实 DOC 转换及镜像构建未验证。
This commit is contained in:
1 parent
7f0ae69252
commit
8ad4b29e4c
12 files changed
+1233
-15
No files matched your search
@@ -155,6 +155,13 @@ class Limits(Model):
|
||||
max_sse_frame_bytes: int = Field(default=256 * 1024, gt=0)
|
||||
max_plugin_buffer_bytes: int = Field(default=1024 * 1024, gt=0)
|
||||
max_host_calls_per_hook: int = Field(default=64, gt=0)
|
||||
max_attachment_files: int = Field(default=8, gt=0)
|
||||
max_attachment_fields: int = Field(default=128, gt=0)
|
||||
max_attachment_text_bytes: int = Field(default=1024 * 1024, gt=0)
|
||||
max_attachment_unpacked_bytes: int = Field(default=32 * 1024 * 1024, gt=0)
|
||||
max_attachment_zip_entries: int = Field(default=2048, gt=0)
|
||||
attachment_timeout_seconds: float = Field(default=10, gt=0)
|
||||
max_attachment_reads: int = Field(default=64, gt=0)
|
||||
upstream_timeout_seconds: float = Field(default=120, gt=0)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user