Skip to content

Commit

Permalink
fix: avoid nil pointer dereference when no cert is provided (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
hydra-yse authored Jan 17, 2025
1 parent 77ac423 commit de962da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var ErrInvalidSignature = fmt.Errorf("invalid signature")
var SignedMsgPrefix = []byte("realtimesync:")

func checkApiKey(config *config.Config, ctx context.Context, req interface{}) error {
if config.CACert.Raw == nil {
if config.CACert == nil || config.CACert.Raw == nil {
return nil
}

Expand Down

0 comments on commit de962da

Please sign in to comment.