From 8e661d5c37f7133537ffb5141d304bb77c4fbe2f Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Fri, 18 Dec 2020 14:51:45 +0300 Subject: [PATCH] [#264] object/get: Prevent receiving payloads through GETRANGE when GET Signed-off-by: Leonard Lyubich --- pkg/services/object/get/assemble.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/services/object/get/assemble.go b/pkg/services/object/get/assemble.go index 8a1f9efe3..29921e8f3 100644 --- a/pkg/services/object/get/assemble.go +++ b/pkg/services/object/get/assemble.go @@ -114,7 +114,7 @@ func (exec *execCtx) initFromChild(id *objectSDK.ID) (prev *objectSDK.ID, childr } func (exec *execCtx) overtakePayloadDirectly(children []*objectSDK.ID, rngs []*objectSDK.Range, checkRight bool) { - withRng := len(rngs) > 0 + withRng := len(rngs) > 0 && exec.ctxRange() != nil for i := range children { var r *objectSDK.Range