fix(actions): check for nil pointer on set claims in access_token (#5172)

This commit is contained in:
Livio Spring 2023-02-09 07:27:39 +01:00 committed by GitHub
parent 3616b6b028
commit 8ef13d77e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -541,7 +541,7 @@ func (o *OPStorage) privateClaimsFlows(ctx context.Context, userID string, claim
actions.SetFields("claims",
actions.SetFields("setClaim", func(key string, value interface{}) {
if _, ok := claims[key]; !ok {
claims[key] = value
claims = appendClaim(claims, key, value)
return
}
claimLogs = append(claimLogs, fmt.Sprintf("key %q already exists", key))