fix: finish profile editor preview scrolling
This commit is contained in:
@@ -263,12 +263,12 @@ func normalizeBypassEntry(raw string) (string, error) {
|
||||
return host, nil
|
||||
}
|
||||
|
||||
var credentialPattern = regexp.MustCompile(`(?i)(https?|socks5h?)://([^/@\s:]+):([^@\s]*)@`)
|
||||
var credentialPattern = regexp.MustCompile(`(?i)((?:https?|socks5h?)://)?([^/@\s:]+):([^@\s]*)@`)
|
||||
|
||||
// RedactText removes URL passwords from diagnostic text without requiring the
|
||||
// surrounding text to be a valid URL.
|
||||
// surrounding text to be a valid URL or to include a scheme.
|
||||
func RedactText(value string) string {
|
||||
return credentialPattern.ReplaceAllString(value, `${1}://${2}:REDACTED@`)
|
||||
return credentialPattern.ReplaceAllString(value, `${1}${2}:REDACTED@`)
|
||||
}
|
||||
|
||||
func ObscureURL(value string) string {
|
||||
|
||||
Reference in New Issue
Block a user