diff --git a/objectnode/acl_api.go b/objectnode/acl_api.go index f59203d2a..114329fd6 100644 --- a/objectnode/acl_api.go +++ b/objectnode/acl_api.go @@ -17,6 +17,7 @@ package objectnode import ( "encoding/json" "encoding/xml" + "fmt" "io" "net/http" "strings" @@ -196,6 +197,9 @@ func getObjectACL(vol *Volume, path string, needDefault bool) (*AccessControlPol if err = json.Unmarshal(data, &acp); err != nil { err = xml.Unmarshal(data, &acp) } + if err == nil && acp == nil { + err = fmt.Errorf("data unmarshal failed") + } } else if needDefault { acp = CreateDefaultACL(vol.owner) }