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

[Bug]: 断点上传处有个bug #1304

Closed
lcxing opened this issue Dec 8, 2022 · 0 comments
Closed

[Bug]: 断点上传处有个bug #1304

lcxing opened this issue Dec 8, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@lcxing
Copy link

lcxing commented Dec 8, 2022

gin-vue-admin 版本

2.4.5Beta

Node 版本

v18.12.1

Golang 版本

go 1.18

是否依旧存在

可以

bug描述

1.正常部署,选择断点上传,上传失败。
2.原因在于默认的const变量是:
const (
breakpointDir = "./breakpointDir/"
finishDir = "./fileDir/"
)
(breakpoint_continue.go 第16行)
出于安全考虑在上传的时候判断是否./:
if strings.Index(fileName, "./") > -1 || strings.Index(FileDir, "./") > -1 {
return "", errors.New("文件名或路径不合法")
}
(breakpoint_continue.go 第57行)
所以拼接上必然会非法。

修改建议

我临时把breakpointDir = "./breakpointDir/"换成了breakpointDir = "breakpointDir/",就成功了。

@lcxing lcxing added the bug Something isn't working label Dec 8, 2022
yziwe pushed a commit to yziwe/gin-vue-admin that referenced this issue Feb 26, 2023
Stephen-Z pushed a commit to Stephen-Z/gin-vue-admin that referenced this issue Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants
@lcxing @SliverHorn @songzhibin97 @bypanghu and others