diff options
Diffstat (limited to '')
-rw-r--r-- | registry/registry.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/registry/registry.go b/registry/registry.go index a6cd41d..d22ac9a 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -268,7 +268,7 @@ func (r *Registry) deliverAcceptToInbox(url, actorUrl, actorKeyUrl *url.URL, fol h := sha256.New() h.Write(jsonData) - digestHeader := base64.StdEncoding.EncodeToString(h.Sum(nil)) + digestHeader := base64.StdEncoding.Strict().EncodeToString(h.Sum(nil)) request.Header.Add("Digest", "SHA-256="+digestHeader) request.Header.Add("Content-Type", "application/activity+json") @@ -311,8 +311,8 @@ func (r *Registry) deliverAcceptToInbox(url, actorUrl, actorKeyUrl *url.URL, fol } r.mu.Unlock() - b64sig := base64.StdEncoding.EncodeToString(signature) - var header = `keyId="` + actorKeyUrl.String() + `",algorithm="hs2019",headers="(request-target) date digest host",signature="` + b64sig + `"` + b64sig := base64.StdEncoding.Strict().EncodeToString(signature) + var header = `keyId="` + actorKeyUrl.String() + `",algorithm="hs2019 ",headers="(request-target) date digest host",signature="` + b64sig + `"` request.Header.Add("Signature", header) //http sig signing code - broken? |