fix!: sign with the raw path instead of filename (#2258)

This commit is contained in:
Gerhard Tan
2022-11-11 16:24:25 +08:00
committed by GitHub
parent 1743110a70
commit 00de9bf16d
6 changed files with 15 additions and 16 deletions

View File

@ -203,8 +203,8 @@ func Link(c *gin.Context) {
common.SuccessResp(c, model.Link{
URL: fmt.Sprintf("%s/p%s?d&sign=%s",
common.GetApiUrl(c.Request),
utils.EncodePath(req.Path, true),
sign.Sign(stdpath.Base(rawPath))),
utils.EncodePath(rawPath, true),
sign.Sign(rawPath)),
})
return
}