@@ -78,10 +78,10 @@ func ValidateCASecret(secret *api_v1.Secret) error {
78
78
79
79
block , _ := pem .Decode (secret .Data [CAKey ])
80
80
if block == nil {
81
- return fmt .Errorf ("The data field %s must hold a valid CERTIFICATE PEM block" , CAKey )
81
+ return fmt .Errorf ("the data field %s must hold a valid CERTIFICATE PEM block" , CAKey )
82
82
}
83
83
if block .Type != "CERTIFICATE" {
84
- return fmt .Errorf ("The data field %s must hold a valid CERTIFICATE PEM block, but got '%s'" , CAKey , block .Type )
84
+ return fmt .Errorf ("the data field %s must hold a valid CERTIFICATE PEM block, but got '%s'" , CAKey , block .Type )
85
85
}
86
86
87
87
_ , err := x509 .ParseCertificate (block .Bytes )
@@ -112,11 +112,11 @@ func ValidateOIDCSecret(secret *api_v1.Secret) error {
112
112
// ValidateHtpasswdSecret validates the secret. If it is valid, the function returns nil.
113
113
func ValidateHtpasswdSecret (secret * api_v1.Secret ) error {
114
114
if secret .Type != SecretTypeHtpasswd {
115
- return fmt .Errorf ("Htpasswd secret must be of the type %v" , SecretTypeHtpasswd )
115
+ return fmt .Errorf ("htpasswd secret must be of the type %v" , SecretTypeHtpasswd )
116
116
}
117
117
118
118
if _ , exists := secret .Data [HtpasswdFileKey ]; ! exists {
119
- return fmt .Errorf ("Htpasswd secret must have the data field %v" , HtpasswdFileKey )
119
+ return fmt .Errorf ("htpasswd secret must have the data field %v" , HtpasswdFileKey )
120
120
}
121
121
122
122
// we don't validate the contents of secret.Data[HtpasswdFileKey], because invalid contents will not make NGINX
@@ -149,7 +149,7 @@ func ValidateSecret(secret *api_v1.Secret) error {
149
149
return ValidateHtpasswdSecret (secret )
150
150
}
151
151
152
- return fmt .Errorf ("Secret is of the unsupported type %v" , secret .Type )
152
+ return fmt .Errorf ("secret is of the unsupported type %v" , secret .Type )
153
153
}
154
154
155
155
var clientSecretValueFmtRegexp = regexp .MustCompile (`^([^"$\\\s]|\\[^$])*$` )
0 commit comments