X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/469a638785e8562152dff4ba2e05e36b841c4d98..14d7c1fea979212eb27fe5df19b73415d70a0183:/hotline/file_path.go diff --git a/hotline/file_path.go b/hotline/file_path.go index 97ce417..620f54d 100644 --- a/hotline/file_path.go +++ b/hotline/file_path.go @@ -5,6 +5,7 @@ import ( "bytes" "encoding/binary" "errors" + "fmt" "io" "path/filepath" "strings" @@ -119,6 +120,9 @@ func readPath(fileRoot string, filePath, fileName []byte) (fullPath string, err subPath, filepath.Join("/", string(fileName)), ) - + fullPath, err = txtDecoder.String(fullPath) + if err != nil { + return "", fmt.Errorf("invalid filepath encoding: %w", err) + } return fullPath, nil }