diff --git a/src/handlers/fileshdr/handlers.go b/src/handlers/fileshdr/handlers.go index 42cad39..75fd2d1 100644 --- a/src/handlers/fileshdr/handlers.go +++ b/src/handlers/fileshdr/handlers.go @@ -96,7 +96,7 @@ func (h *FileHandlers) canAccess(userID, role, op, path string) bool { // the file path must start with userID: /... parts := strings.Split(path, "/") - if len(parts) < 1 { + if len(parts) < 2 { // the path must be longer than /files return false } else if parts[0] == userID { return true