MCPcopy Index your code
hub / github.com/TruthHun/BookStack / isValidSign

Method isValidSign

controllers/StaticController.go:179–185  ·  view source on GitHub ↗

是否是合法的签名(针对音频和视频,签名不可用的时候再验证用户有没有登录,用户登录了再验证用户是不是书籍所有人)

(sign, path string)

Source from the content-addressed store, hash-verified

177
178// 是否是合法的签名(针对音频和视频,签名不可用的时候再验证用户有没有登录,用户登录了再验证用户是不是书籍所有人)
179func (this *StaticController) isValidSign(sign, path string) bool {
180 signPath, err := utils.ParseMediaSign(sign)
181 if err != nil {
182 return false
183 }
184 return signPath == path
185}

Callers 2

UploadsMethod · 0.95
ProjectsFileMethod · 0.95

Calls 1

ParseMediaSignFunction · 0.92

Tested by

no test coverage detected