You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 24, 2023. It is now read-only.
The README mentions that the config property KeyRefreshUnknownKID is a boolean defaulting to false, but in code the field on Config has type *bool and is referenced in exactly one place, inside of KeySet.getKey:
jsonKey, ok=j.Keys[kid]
j.mux.RUnlock()
// Check if the key was present.if!ok {
// Check to see if configured to refresh on unknown kid.if*j.Config.KeyRefreshUnknownKID {
Thus, if you don't specify a non-nil value for this property and you reach this line because you did provide a value for KeySetURL, your program will panic. I believe we've seen this in testing.
What we could do, and what seems in line with the use of other pointer-valued config properties in this file, is change the conditional to
Please note that this snippet is due to some copied code from github.com/MicahParks/keyfunc. It's pretty old and there has since been a v1.X.X release which fixes a few bugs.
The README mentions that the config property
KeyRefreshUnknownKID
is a boolean defaulting to false, but in code the field onConfig
has type*bool
and is referenced in exactly one place, inside ofKeySet.getKey
:Thus, if you don't specify a non-
nil
value for this property and you reach this line because you did provide a value forKeySetURL
, your program will panic. I believe we've seen this in testing.What we could do, and what seems in line with the use of other pointer-valued config properties in this file, is change the conditional to
The text was updated successfully, but these errors were encountered: