chore: 优化代码质量和安全性\n\n- 删除未使用的 @aws-sdk/lib-storage 依赖,简化依赖\n- 修复重复导入 database 模块\n- 消除 formatSize 重复代码,提取为共享函数\n- 修复 verify.html XSS 漏洞,添加 HTML 转义\n- 更新 index.html 过时文案(断点续传→直连上传)

This commit is contained in:
Claude Opus
2026-01-18 20:23:39 +08:00
parent 2a4927f260
commit 7aa8a862a4
5 changed files with 40 additions and 61 deletions

View File

@@ -3195,7 +3195,6 @@ app.post('/api/share/create', authMiddleware, (req, res) => {
});
// 更新分享的存储类型
const { db } = require('./database');
db.prepare('UPDATE shares SET storage_type = ? WHERE id = ?')
.run(req.user.current_storage_type || 'oss', result.id);