Skip to content

Commit

Permalink
Merge pull request #5997 from aduffeck/fix-oidc-cache
Browse files Browse the repository at this point in the history
Fix OIDC cache
  • Loading branch information
aduffeck authored Apr 3, 2023
2 parents 1a31aba + 08dc9b7 commit 668a370
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-oidc-auth-cache.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix OIDC auth cache

We've fixed an issue rendering the OIDC auth cache useless.

https://github.com/owncloud/ocis/pull/5997
2 changes: 1 addition & 1 deletion services/proxy/pkg/middleware/oidc_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (m *OIDCAuthenticator) getClaims(token string, req *http.Request) (map[stri
if err != nil && err != store.ErrNotFound {
m.Logger.Error().Err(err).Msg("could not read from userinfo cache")
}
if len(record) > 1 {
if len(record) > 0 {
if err = msgpack.Unmarshal(record[0].Value, &claims); err == nil {
m.Logger.Debug().Interface("claims", claims).Msg("cache hit for userinfo")
return claims, nil
Expand Down

0 comments on commit 668a370

Please sign in to comment.