fix: 完成商务迁移复核与接口优化并清理历史资料
This commit is contained in:
@@ -501,7 +501,12 @@ func IsIntegrationSecretKey(key string) bool {
|
||||
if strings.Contains(normalized, "secret") || strings.Contains(normalized, "password") || strings.Contains(normalized, "private") || strings.Contains(normalized, "credential") || strings.Contains(normalized, "token") {
|
||||
return true
|
||||
}
|
||||
for _, item := range []string{"key_pem", "api_key", "mch_key", "client_key", "certificate", "cert", "cert_pem", "p12", "pkcs12", "public_key", "platform_cert", "root_cert"} {
|
||||
// Providers accept inline PEM, file and path aliases of the same secret.
|
||||
// Strip only these transport suffixes; ordinary content/path fields stay public.
|
||||
for _, suffix := range []string{"_content", "_path", "_file", "_pem"} {
|
||||
normalized = strings.TrimSuffix(normalized, suffix)
|
||||
}
|
||||
for _, item := range []string{"key", "api_key", "mch_key", "client_key", "certificate", "cert", "p12", "pkcs12", "public_key", "platform_cert", "root_cert"} {
|
||||
if normalized == item || strings.HasSuffix(normalized, "_"+item) {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user