From 264e3eedd8241997f337ccbedffff501f6b4a17d Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sun, 12 Apr 2026 15:04:24 +0800 Subject: [PATCH] fix: correct regex pattern for shell meta characters --- astrbot/core/agent/mcp_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astrbot/core/agent/mcp_client.py b/astrbot/core/agent/mcp_client.py index 0264dd3a0..c149792dc 100644 --- a/astrbot/core/agent/mcp_client.py +++ b/astrbot/core/agent/mcp_client.py @@ -78,7 +78,7 @@ _DENIED_STDIO_COMMANDS = frozenset( "halt", } ) -_SHELL_META_RE = re.compile(r"[\r\n\x00;&|<>`$()]") +_SHELL_META_RE = re.compile(r"[\r\n\x00;&|<>`$]") _PYTHON_INLINE_CODE_FLAGS = frozenset({"-c"}) _JS_INLINE_CODE_FLAGS = frozenset({"-e", "--eval", "-p", "--print"}) _DENIED_DOCKER_ARGS = frozenset(