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

bugfix: fast_transfer_file API 分发文件,如果源文件中的文件名包含空格,会报错 #812

Closed
wangyu096 opened this issue Apr 12, 2022 · 1 comment
Assignees
Labels
done 已上线到正式环境并验收通过 kind/bug 程序故障Bug,漏洞
Milestone

Comments

@wangyu096
Copy link
Collaborator

Version / Branch / tag

3.4.x
出了什么问题?(What Happened?)
fast_transfer_file API 分发文件,如果源文件中的文件名包含空格,会报错

.a.e.v.EsbFastTransferFileV3ResourceImpl : Invalid path:/data/test_2022 04 12.apk

如何复现?(How to reproduce?)

源文件包含空格
预期结果(What you expect?)
linux文件名按照linux文件系统的规范,空格也是合法的文件名

@wangyu096 wangyu096 added the kind/bug 程序故障Bug,漏洞 label Apr 12, 2022
@wangyu096 wangyu096 added this to the V3.5.1 milestone Apr 12, 2022
@TencentBlueKing TencentBlueKing deleted a comment from liuliaozhong Dec 29, 2022
@liuliaozhong
Copy link
Collaborator

从报错的信息分析,问题出在EsbFastTransferFileV3ResourceImpl#validateFileSystemPath(String path)方法
image
在windows和linux中空格都是合法的,这三行判空代码可以去掉吧?
另外,window中文件名或文件夹名中不能出现以下字符:\、/、:、*、?、"、<、>、| ,判断有这些字符出现不合法。

wangyu096 added a commit that referenced this issue Apr 7, 2023
fast_transfer_file API 分发文件,如果源文件中的文件名包含空格,会报错 #812
wangyu096 added a commit that referenced this issue Apr 10, 2023
fast_transfer_file API 分发文件,如果源文件中的文件名包含空格,会报错 #812
wangyu096 added a commit that referenced this issue Apr 24, 2023
fix: fast_transfer_file API 分发文件,如果源文件中的文件名包含空格,会报错 #812
@bkjob-bot bkjob-bot added the done 已上线到正式环境并验收通过 label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done 已上线到正式环境并验收通过 kind/bug 程序故障Bug,漏洞
Projects
None yet
Development

No branches or pull requests

4 participants