Files
Nexus/docs/audit/2026-06-13-files-new-file-fix.md
2026-07-08 22:31:31 +08:00

1.1 KiB

审计 — 文件管理「新建文件」修复

Changelog: docs/changelog/2026-06-13-files-new-file-fix.md

变更文件

文件 说明
frontend/src/composables/files/useFilesActions.ts openNewFileDialog、等待编辑器就绪
frontend/src/composables/files/useFilesEditor.ts 导出 waitForEditorWorkbench
frontend/src/composables/files/useFilesPage.ts 透传 helper
frontend/src/components/files/FilesToolbar.vue 未选服务器时提示
server/infrastructure/ssh/asyncssh_pool.py SFTP 写前确保父目录

Step 3(规则扫描)

规则 结论 说明
鉴权 PASS 仍走 /sync/write-file + admin JWT
路径 PASS validatePathSegment 不变
静默失败 PASS 编辑器未就绪有 warning snackbar
SSH PASS mkdir -p 仅父目录

Closure

文件 结论
useFilesActions.ts SAFE — snackbar 错误提示
asyncssh_pool.py SAFE — 复用 _ensure_remote_parent_dir

DoD

  • changelog + 本审计
  • frontend type-check
  • 生产验证新建文件