We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用 key 定义文件名时 完全没有对后缀进行校验 可能导致存储型 XSS 漏洞
配合 midway 的 upload.whitelist 配置进行校验
/src/modules/plugin/hooks/upload/index.ts
The text was updated successfully, but these errors were encountered:
midway可以配置文件白名单 https://www.midwayjs.org/docs/extensions/upload#%E4%B8%8A%E4%BC%A0%E7%99%BD%E5%90%8D%E5%8D%95
Sorry, something went wrong.
额 我就是说在设置白名单的情况下 这里没有校验 注意是使用 key 作为命名的情况下 不是 filename
可以提交个pr 看看
No branches or pull requests
问题:
使用 key 定义文件名时 完全没有对后缀进行校验
可能导致存储型 XSS 漏洞
建议:
配合 midway 的 upload.whitelist 配置进行校验
问题文件
/src/modules/plugin/hooks/upload/index.ts
The text was updated successfully, but these errors were encountered: