here
|
func toSecret(secretManager SecretManager, text Secret, file, ref string) (SecretReader, error) { |
|
if text != "" { |
|
return NewInlineSecret(string(text)), nil |
|
} |
|
if file != "" { |
|
return NewFileSecret(file), nil |
|
} |
|
if ref != "" { |
|
if secretManager == nil { |
|
return nil, errors.New("cannot use secret ref without manager") |
|
} |
|
return &refSecret{ |
|
ref: ref, |
|
manager: secretManager, |
|
}, nil |
|
} |
|
return nil, nil |
because the error is nil, we may/would be moving nils around, leading to nil pointer dereference
may be the cause of prometheus/prometheus#16622
here
common/config/http_config.go
Lines 781 to 797 in 098669c
because the error is nil, we may/would be moving nils around, leading to nil pointer dereference
may be the cause of prometheus/prometheus#16622