mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix: avoid out of slice index (#16925)
This commit is contained in:
@@ -39,7 +39,7 @@ var ldapPwdRegex = regexp.MustCompile("(^.*?)LDAPPassword=([^&]*?)(&(.*?))?$")
|
||||
// redact LDAP password if part of string
|
||||
func redactLDAPPwd(s string) string {
|
||||
parts := ldapPwdRegex.FindStringSubmatch(s)
|
||||
if len(parts) > 0 {
|
||||
if len(parts) > 3 {
|
||||
return parts[1] + "LDAPPassword=*REDACTED*" + parts[3]
|
||||
}
|
||||
return s
|
||||
|
||||
Reference in New Issue
Block a user