mirror of https://github.com/minio/minio.git
fix: avoid out of slice index (#16925)
This commit is contained in:
parent
b04956a676
commit
c468b4e2a8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue