安全漏洞 / 高 / 前端组件
src/components/confirmation/ConfirmationDialog.tsx
ConfirmationDialog 提供 "autoExecute" 选项(勾选后该工具永久自动执行):
const handleAutoExecuteChange = (checked: boolean) => { if (checked) { setPendingAutoExecute(true); // 弹出二次确认 openConfirmDialog({ title: '确认自动执行?', message: '此工具将永久自动执行,包括未来的危险操作。确定吗?', onConfirm: () => setAutoExecute(true), }); } else { setAutoExecute(false); } };
文件: src/components/ConfirmationDialog.tsx
src/components/ConfirmationDialog.tsx
修复: 勾选 autoExecute 时不再立即生效,改为弹出二次确认 Dialog(MUI),用户确认后才真正 setAutoExecute(true) + setRemember(true)。取消则保持未勾选。
setAutoExecute(true)
setRemember(true)
验证: tsc --noEmit 类型检查通过。
tsc --noEmit
No dependencies set.
The note is not visible to the blocked user.
问题类型
安全漏洞 / 高 / 前端组件
文件位置
src/components/confirmation/ConfirmationDialog.tsx问题描述
ConfirmationDialog 提供 "autoExecute" 选项(勾选后该工具永久自动执行):
影响
建议修复
修复说明
文件:
src/components/ConfirmationDialog.tsx修复: 勾选 autoExecute 时不再立即生效,改为弹出二次确认 Dialog(MUI),用户确认后才真正
setAutoExecute(true)+setRemember(true)。取消则保持未勾选。验证:
tsc --noEmit类型检查通过。