test(files): add permission tests for basic file operations, with some security fixes

This commit is contained in:
hexxa 2022-02-21 17:38:20 +08:00 committed by Hexxa
parent 980bceb090
commit cff87bdddd
4 changed files with 462 additions and 71 deletions

View file

@ -27,6 +27,10 @@ var (
TokenCookie = "tk"
LastID = "lid"
// DownloadChunkSize can not be greater than limiter's token count
// downloadSpeedLimit can not be lower than DownloadChunkSize
DownloadChunkSize = 100 * 1024
ErrAccessDenied = errors.New("access denied")
ErrUnauthorized = errors.New("unauthorized")
)