From 230e5382812e44ef812e88b074bb979eabf022d1 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Thu, 9 Feb 2023 16:22:35 +0100 Subject: [PATCH] STSCertificateIdentity: Init request form (#1770) Initialize request form before writing. Fixes #1769 --- pkg/credentials/sts_tls_identity.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/credentials/sts_tls_identity.go b/pkg/credentials/sts_tls_identity.go index a0ad09046..dee0a8cbb 100644 --- a/pkg/credentials/sts_tls_identity.go +++ b/pkg/credentials/sts_tls_identity.go @@ -140,6 +140,9 @@ func (i *STSCertificateIdentity) Retrieve() (Value, error) { if err != nil { return Value{}, err } + if req.Form == nil { + req.Form = url.Values{} + } req.Form.Add("DurationSeconds", strconv.FormatUint(uint64(livetime.Seconds()), 10)) resp, err := i.Client.Do(req)