发布日期: 2026-05-10
版本号: v0.9.5

本次更新主要增强了系统安全性和功能稳定性。在安全方面,新增了基于重定向的SSRF防护机制,默认阻止所有对外HTTP请求的3xx重定向,并修复了包括图片URL、文件处理、工具更新在内的多处安全漏洞,防止未授权访问和内容注入。同时,管理员现在可通过环境变量配置iframe的内容安全策略和终端代理响应头,并对模型参数、共享聊天、文件权限等进行了精细化控制。功能上,新增了通道实时流式响应支持及细粒度的Markdown渲染控制选项。修复方面,解决了笔记创建、技能与日历公开分享、反馈用户信息伪造、旧聊天记录加载等多个问题,并更新了葡萄牙语翻译。变更部分移除了一个未认证的检索状态端点。总体上,此次更新进一步强化了系统的防御纵深,并提升了管理与使用的灵活性。

更新内容 (中文)

新增

  • 🛡️ 基于重定向的 SSRF 防护。 所有出站 HTTP 请求现在默认通过新的 AIOHTTP_CLIENT_ALLOW_REDIRECTS 环境变量阻止 3xx 重定向,防止公共 URL 静默重定向到内部地址(RFC 1918、回环地址、云元数据端点)的重定向式 SSRF 攻击。受影响的调用点包括网页抓取、图片加载、OAuth 发现、工具服务器执行和代码解释器登录。#24491
  • 🛡️ Iframe 内容安全策略。 管理员现在可以通过 IFRAME_CSP 环境变量为所有 srcdoc iframe(工件、工具嵌入、文件预览、引用模态框)配置内容安全策略,限制 LLM 生成或用户上传的 HTML 在预览中可加载和执行的内容。提交记录
  • 🎛️ 精细的 Markdown 渲染控制。 用户现在可以从界面设置中独立禁用用户消息和助手响应的 Markdown 渲染,防止粘贴包含 Markdown 敏感字符的文本时出现意外格式。提交记录
  • 🔧 终端代理响应头。 管理员现在可以通过 TERMINAL_PROXY_HEADERS 环境变量(JSON 对象)向终端代理响应注入自定义响应头,为代理内容启用特定于部署的安全头(如沙箱策略)。提交记录
  • 🔌 频道流式传输与工具支持。 在频道中提及模型现在可以实时流式传输响应,并支持完整的聊天补全流程,包括原生和默认函数调用、内置工具(网页搜索、图片生成)、用户工具、MCP 工具、过滤器以及 RAG 知识注入——与标准聊天中可用的功能相同。

已修复

  • 📝 笔记创建与打开可靠性。 创建新笔记和打开现有笔记时不再因 is_pinned 在创建时传递给 SQLAlchemy 模型以及在读取时两次传递给 NoteResponse 导致的 TypeError 而失败。#24484#24486
  • 🔐 技能公开共享权限强制执行。 创建或更新技能现在会通过 sharing.public_skills 权限过滤访问授权,防止非管理员用户在没有所需权限的情况下使技能公开可访问。#24494
  • 🔐 日历公开共享权限强制执行。 创建或更新日历现在会通过新的 sharing.public_calendars 权限过滤访问授权,防止用户在没有管理员明确授予的共享权限的情况下使日历公开可读或可写。#24493
  • 🔐 反馈用户归属伪造。 提交评估反馈现在无法通过批量赋值伪造 user_id 字段,防止已认证用户将评分归属给其他用户,破坏 Elo 排行榜和管理员反馈导出。#24508
  • 🛡️ 图片 URL 重定向式 SSRF。 包含图片 URL 的聊天消息在 base64 转换过程中不再跟随 3xx 重定向到内部地址,关闭了最易访问且无需特殊权限或功能标志的重定向式 SSRF 变体。#24524
  • 🛡️ 文件处理时的集合写入访问权限。 process_fileprocess_files_batch 检索端点现在会在嵌入内容前强制执行集合写入访问检查,防止已认证用户将文件内容注入到其他用户的知识库集合中。#24524
  • 🔐 工具源代码更新授权。 更新工具的 Python 源代码现在需要 workspace.toolsworkspace.tools_import 权限,防止仅拥有写入访问授权的用户覆盖可执行工具代码,同时仍允许元数据编辑。#24513
  • 🔐 频道消息所有权强制执行。 更新或删除群组和私信频道中的消息现在需要消息所有权,防止频道成员篡改或静默删除其他成员的消息。#24506
  • 🔐 频道置顶消息写入权限。 在标准频道上置顶和取消置顶消息现在需要写入权限而非读取权限,防止只读用户修改置顶内容。#24521
  • 🛡️ 图片生成 URL 验证。 生成的图片 URL 现在在获取前通过 validate_url() 进行验证,使纵深防御态势与兄弟图片加载路径保持一致。#24518
  • 🔐 只读用户的模型参数暴露。 每个模型的 API 端点现在会从响应中剥离 params 字典(包括系统提示)给没有写入权限的调用者,防止只读用户查看管理员精心配置的模型配置。#24525
  • 🛡️ URL 解析器 SSRF 绕过。 URL 验证现在会拒绝反斜杠、制表符、回车符和换行符,这些字符会导致 urllib 和 requests/aiohttp 对目标主机的理解不一致,关闭了解析器混淆 SSRF 绕过。#24534
  • 🛡️ 个人资料图片 MIME 类型允许列表。 从数据 URI 提供个人资料图片现在会强制执行严格的 MIME 类型允许列表(默认为 PNG、JPEG、GIF、WEBP,可通过 PROFILE_IMAGE_ALLOWED_MIME_TYPES 配置),并设置 X-Content-Type-Options: nosniff,防止通过 SVG 或其他可执行内容类型进行存储型 XSS 攻击。提交记录
  • 🔐 文件夹和知识库附件中的文件所有权。 将文件附加到文件夹或知识库现在会验证每个文件的读取权限,并且聊天中间件中的文件夹文件列表会被过滤为调用者可读取的条目,防止未经授权的文件内容被注入到 RAG 上下文中。提交记录
  • 🔐 所有者和管理员的共享聊天访问权限。 聊天所有者现在可以查看和克隆自己共享的聊天,无需显式的访问授权;管理员可以管理任何聊天的共享访问控制。提交记录提交记录
  • 🧵 旧版聊天记录自修复。 加载旧版对话现在会自动检测迁移消息记录中损坏的父链接图,从嵌入的 JSON 历史中合并缺失的消息,并将其回填到规范化的表中,以便未来的加载使用快速路径且不丢失数据。提交记录
  • 🎛️ 过滤器选择器响应性。 模型过滤器复选框现在从当前过滤器列表和选定 ID 派生响应式状态,而不是在挂载时捕获一次性快照,因此当模型上下文或过滤器配置在运行时更改时,复选框会正确更新。提交记录
  • 🌐 葡萄牙语(巴西)翻译更新。 添加了新增 UI 项目的翻译,并对现有条目进行了一致性检查。#24503

变更

  • 🧹 移除了未认证的检索状态端点。 未认证的 GET /api/v1/retrieval/ 状态端点已作为死代码被移除——检索配置已通过已认证的管理员端点提供。#24497
  • 📋 PR 模板的议题要求。 拉取请求现在需要关联 Issue 或 Discussion 引用,确保所有贡献的可追溯性。没有关联议题或讨论的拉取请求可能会在不审查的情况下关闭。

更新内容 (原始)

Added

  • 🛡️ Redirect-based SSRF protection. All outbound HTTP requests now block 3xx redirects by default via a new AIOHTTP_CLIENT_ALLOW_REDIRECTS environment variable, preventing redirect-based SSRF where a public URL silently redirects to internal addresses (RFC 1918, loopback, cloud-metadata endpoints). Affected call sites include web fetch, image loading, OAuth discovery, tool server execution, and code interpreter login. #24491
  • 🛡️ Iframe content security policy. Administrators can now configure a Content-Security-Policy for all srcdoc iframes (Artifacts, tool embeds, file previews, citation modals) via the IFRAME_CSP environment variable, restricting what LLM-generated or user-uploaded HTML can load and execute inside previews. Commit
  • 🎛️ Granular markdown rendering controls. Users can now independently disable Markdown rendering for user messages and assistant responses from Interface settings, preventing unintended formatting when pasting text that contains Markdown-sensitive characters. Commit
  • 🔧 Terminal proxy response headers. Administrators can now inject custom response headers into terminal proxy responses via the TERMINAL_PROXY_HEADERS environment variable (JSON object), enabling deployment-specific security headers like sandbox policies for proxied content. Commit
  • 🔌 Channel streaming and tool support. Mentioning a model in a Channel now streams responses in real time and supports the full chat completion pipeline, including native and default function calling, built-in tools (web search, image generation), user tools, MCP tools, filters, and RAG knowledge injection — the same capabilities available in standard chats.

Fixed

  • 📝 Notes create and open reliability. Creating new notes and opening existing notes no longer fails with a TypeError caused by is_pinned being passed to the SQLAlchemy model on create, and passed twice to NoteResponse on read. #24484, #24486
  • 🔐 Skill public sharing permission enforcement. Creating or updating skills now filters access grants through the sharing.public_skills permission, preventing non-admin users from making skills publicly accessible without the required permission. #24494
  • 🔐 Calendar public sharing permission enforcement. Creating or updating calendars now filters access grants through a new sharing.public_calendars permission, preventing users from making calendars publicly readable or writable without explicit admin-granted sharing permission. #24493
  • 🔐 Feedback user attribution spoofing. Submitting evaluation feedback can no longer forge the user_id field through mass-assignment, preventing authenticated users from attributing ratings to other users and corrupting Elo leaderboard rankings and admin feedback exports. #24508
  • 🛡️ Image URL redirect-based SSRF. Chat messages containing image URLs no longer follow 3xx redirects to internal addresses during base64 conversion, closing the most reachable redirect-based SSRF variant that required no special permissions or feature flags. #24524
  • 🛡️ Collection write access on file processing. The process_file and process_files_batch retrieval endpoints now enforce collection write-access checks before embedding content, preventing authenticated users from injecting file content into another user’s knowledge-base collection. #24524
  • 🔐 Tool source code update authorization. Updating a tool’s Python source code now requires workspace.tools or workspace.tools_import permission, preventing users with only a write-access grant from overwriting executable tool code while still allowing metadata edits. #24513
  • 🔐 Channel message ownership enforcement. Updating or deleting messages in group and DM channels now requires message ownership, preventing channel members from tampering with or silently removing other members’ messages. #24506
  • 🔐 Channel pin write permission. Pinning and unpinning messages on standard channels now requires write permission instead of read permission, preventing read-only users from modifying pinned content. #24521
  • 🛡️ Image generation URL validation. Generated image URLs are now validated through validate_url() before fetching, aligning the defense-in-depth posture with sibling image-loading paths. #24518
  • 🔐 Model params exposure for read-only users. The per-model API endpoint now strips the params dict (including system prompts) from responses to callers without write access, preventing read-only users from viewing admin-curated model configuration. #24525
  • 🛡️ URL parser SSRF bypass. URL validation now rejects backslash, tab, CR, and LF characters that cause urllib and requests/aiohttp to disagree on the target host, closing a parser-confusion SSRF bypass. #24534
  • 🛡️ Profile image MIME-type allowlist. Serving profile images from data URIs now enforces a strict MIME-type allowlist (PNG, JPEG, GIF, WEBP by default, configurable via PROFILE_IMAGE_ALLOWED_MIME_TYPES) and sets X-Content-Type-Options: nosniff, preventing stored-XSS through SVG or other executable content types. Commit
  • 🔐 File ownership in folder and knowledge attachments. Attaching files to folders or knowledge bases now verifies per-file read access, and folder file lists in chat middleware are filtered to entries the caller can read, preventing unauthorized file content from being injected into RAG context. Commit
  • 🔐 Shared chat access for owners and admins. Chat owners can now view and clone their own shared chats without requiring an explicit access grant, and administrators can manage shared chat access controls on any chat. Commit, Commit
  • 🧵 Legacy chat history self-healing. Loading legacy conversations now automatically detects broken parent-link graphs in migrated message records, merges missing messages from the embedded JSON history, and backfills them to the normalized table so future loads use the fast path without data loss. Commit
  • 🎛️ Filter selector reactivity. Model filter checkboxes now derive state reactively from the current filter list and selected IDs instead of capturing a one-time snapshot at mount, so checkboxes update correctly when model contexts or filter configurations change at runtime. Commit
  • 🌐 Portuguese (Brazil) translation updates. Translations for newly added UI items were added along with a consistency pass across existing entries. #24503

Changed

  • 🧹 Removed unauthenticated retrieval status endpoint. The unauthenticated GET /api/v1/retrieval/ status endpoint has been removed as dead code — retrieval configuration is already available through authenticated admin endpoints. #24497
  • 📋 PR template issue requirement. Pull requests now require a linked Issue or Discussion reference, ensuring better traceability for all contributions. PRs without a linked issue or discussion may be closed without review.

下载链接