From 62a38ab680278192618a1772cf43ce546d8ad3f8 Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Thu, 3 Jul 2025 15:34:58 +0200 Subject: [PATCH 1/2] fix: remove useless lock --- token/hmac/hmacsha.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/token/hmac/hmacsha.go b/token/hmac/hmacsha.go index d319ef608..8411fbdbf 100644 --- a/token/hmac/hmacsha.go +++ b/token/hmac/hmacsha.go @@ -12,10 +12,8 @@ import ( "crypto/sha512" "encoding/base64" "fmt" - "strings" - "sync" - "github.com/ory/x/errorsx" + "strings" "github.com/pkg/errors" @@ -31,7 +29,6 @@ type HMACStrategyConfigurator interface { // HMACStrategy is responsible for generating and validating challenges. type HMACStrategy struct { - sync.Mutex Config HMACStrategyConfigurator } @@ -45,9 +42,6 @@ var b64 = base64.URLEncoding.WithPadding(base64.NoPadding) // Generate generates a token and a matching signature or returns an error. // This method implements rfc6819 Section 5.1.4.2.2: Use High Entropy for Secrets. func (c *HMACStrategy) Generate(ctx context.Context) (string, string, error) { - c.Lock() - defer c.Unlock() - globalSecret, err := c.Config.GetGlobalSecret(ctx) if err != nil { return "", "", err From e7f939b895746e3a9801533e0a2218a41cb078c8 Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Thu, 3 Jul 2025 15:36:29 +0200 Subject: [PATCH 2/2] chore: synchronize workspaces --- token/hmac/hmacsha.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/token/hmac/hmacsha.go b/token/hmac/hmacsha.go index 8411fbdbf..b233929cf 100644 --- a/token/hmac/hmacsha.go +++ b/token/hmac/hmacsha.go @@ -12,9 +12,10 @@ import ( "crypto/sha512" "encoding/base64" "fmt" - "github.com/ory/x/errorsx" "strings" + "github.com/ory/x/errorsx" + "github.com/pkg/errors" "github.com/ory/fosite"