diff --git a/errors.go b/errors.go index 369c8ca3..b37b1d97 100644 --- a/errors.go +++ b/errors.go @@ -178,7 +178,7 @@ func redactPW(connString string) string { connString = quotedDSN.ReplaceAllLiteralString(connString, "password=xxxxx") plainDSN := regexp.MustCompile(`password=[^ ]*`) connString = plainDSN.ReplaceAllLiteralString(connString, "password=xxxxx") - brokenURL := regexp.MustCompile(`:\w.*@`) + brokenURL := regexp.MustCompile(`:[^:@]+?@`) connString = brokenURL.ReplaceAllLiteralString(connString, ":xxxxxx@") return connString }