Skip to content
New issue

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

关于配置中心导入文件的文件格式(后缀)白名单的需求 #4912

Closed
Xezeloh opened this issue Feb 18, 2021 · 3 comments
Closed
Labels
status/wontfix This will not be worked on

Comments

@Xezeloh
Copy link

Xezeloh commented Feb 18, 2021

Is your feature request related to a problem? Please describe.
When importing the configuration file, the imported file itself and the file format inside the zip package are not checked. In the interface where other users can upload files, the file format is not verified. This can cause unsafe file types to pass in.
导入配置文件的时候,未对导入的文件本身以及zip包内部的文件格式做校验。在其他用户可以上传文件的接口中,也未校验文件格式。这可能导致不安全的文件类型传入。

Describe the solution you'd like
根据白名单对文件格式作过滤

Describe alternatives you've considered

Additional context
config module
配置中心模块

@KomachiSion
Copy link
Collaborator

导入导出功能设计之初是为了方便迁移和同步配置,请问是什么场景会出现导入不安全的文件类型?

@Xezeloh
Copy link
Author

Xezeloh commented Feb 22, 2021

导入导出功能设计之初是为了方便迁移和同步配置,请问是什么场景会出现导入不安全的文件类型?

比如攻击者可能会借机上传可执行文件?

@KomachiSion
Copy link
Collaborator

重新排查代码,上传文件将会作为内容直接写入mysql,不会读取其可执行内容并执行,暂时没有发现类似的风险。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants