今日安全题 #2
这是 2026-11-02 的题目。 阅读代码,选出最严重的安全漏洞。
这是一个提供已上传文件下载的Express路由。最严重的漏洞是什么?
const path = require('path');
app.get('/download', (req, res) => {
const file = req.query.name;
const target = path.join(__dirname, 'uploads', file);
res.sendFile(target);
});