Browse Source

Update handlers.go

Compare secrets just on not public clients

Signed-off-by: Miguel Martinez <martinezcanteromiguel@gmail.com>
pull/3302/head
Miguel Martinez 2 years ago committed by GitHub
parent
commit
da9c65f5e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      server/handlers.go

2
server/handlers.go

@ -813,7 +813,7 @@ func (s *Server) withClientFromStorage(w http.ResponseWriter, r *http.Request, h
return
}
if subtle.ConstantTimeCompare([]byte(client.Secret), []byte(clientSecret)) != 1 {
if !client.Public && subtle.ConstantTimeCompare([]byte(client.Secret), []byte(clientSecret)) != 1 {
if clientSecret == "" {
s.logger.Infof("missing client_secret on token request for client: %s", client.ID)
} else {

Loading…
Cancel
Save