From 9f4307b5d9ed81e8af970a9e3e68a050aabfe994 Mon Sep 17 00:00:00 2001 From: p Date: Thu, 13 Aug 2026 17:00:42 +0800 Subject: [PATCH] workspace: fix xterm cmdargs (asyncssh create_process single command) --- wwwroot/workspace_edit.xterm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wwwroot/workspace_edit.xterm b/wwwroot/workspace_edit.xterm index fd85e4b..1fc2e3c 100644 --- a/wwwroot/workspace_edit.xterm +++ b/wwwroot/workspace_edit.xterm @@ -1,4 +1,5 @@ import os +import shlex file_id = (params_kw or {}).get('id', '').strip() @@ -29,7 +30,7 @@ if not file_id or not ws_dir: r = DictObject() r.host = 'localhost' r.username = 'pipeline' - r.cmdargs = ['echo', '未指定文件'] + r.cmdargs = ['echo 未指定文件'] return r full_path = ws_dir + '/' + file_id @@ -41,11 +42,11 @@ if not real_full.startswith(real_ws + os.sep): r = DictObject() r.host = 'localhost' r.username = 'pipeline' - r.cmdargs = ['echo', '非法路径'] + r.cmdargs = ['echo 非法路径'] return r r = DictObject() r.host = 'localhost' r.username = 'pipeline' -r.cmdargs = ['vi', full_path] +r.cmdargs = ['vi ' + shlex.quote(full_path)] return r