From e83d39e33f901a2158f82434fb8b98bd0b0d9b2e Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Mon, 15 Jul 2024 23:04:41 +0300 Subject: [PATCH] [#1253] deleteSvc: Use copy of common parameters getSvc may change the values of some fields, so Head will affect Delete or Put. In this case, the change is necessary so that the session token is stored in the tombstone object (EC assemble calls `ForgetTokens`). Signed-off-by: Dmitrii Stepanov --- pkg/services/object/delete/util.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/services/object/delete/util.go b/pkg/services/object/delete/util.go index bb2b5f00b..a78fd7747 100644 --- a/pkg/services/object/delete/util.go +++ b/pkg/services/object/delete/util.go @@ -30,7 +30,12 @@ func (w *headSvcWrapper) headAddress(ctx context.Context, exec *execCtx, addr oi wr := getsvc.NewSimpleObjectWriter() p := getsvc.HeadPrm{} - p.SetCommonParameters(exec.commonParameters()) + + if cp := exec.commonParameters(); cp != nil { + commonParameters := *cp + p.SetCommonParameters(&commonParameters) + } + p.SetHeaderWriter(wr) p.WithRawFlag(true) p.WithAddress(addr)