[#85] get-service: Fix corrupted chain logic
Should return an error in case of a broken LOB reference chain. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
2886b1581b
commit
07de839f18
3 changed files with 19 additions and 15 deletions
|
@ -220,6 +220,8 @@ func (exec *execCtx) getChild(id oid.ID, rng *objectSDK.Range, withHdr bool) (*o
|
|||
exec.err = errors.New("wrong child header")
|
||||
|
||||
exec.log.Debug("parent address in child object differs")
|
||||
|
||||
return nil, false
|
||||
}
|
||||
|
||||
return child, ok
|
||||
|
@ -256,8 +258,10 @@ func (exec *execCtx) headChild(id oid.ID) (*objectSDK.Object, bool) {
|
|||
|
||||
if !exec.isChild(child) {
|
||||
exec.status = statusUndefined
|
||||
exec.err = errors.New("parent address in child object differs")
|
||||
|
||||
exec.log.Debug("parent address in child object differs")
|
||||
return nil, false
|
||||
} else {
|
||||
exec.status = statusOK
|
||||
exec.err = nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue