change regexes for ipv6 addresses to catch url-encoded addresses

This commit is contained in:
luciole 2022-11-14 17:30:36 +01:00 committed by Cecylia Bocovich
parent 4ebd85e5d1
commit 90d1a56719
No known key found for this signature in database
GPG key ID: 009DE379FD9B7B90
2 changed files with 10 additions and 2 deletions

View file

@ -77,6 +77,11 @@ func TestLogScrubberMessages(t *testing.T) {
"2019/05/08 15:37:31 starting",
"2019/05/08 15:37:31 starting\n",
},
{
//Make sure ipv6 addresses where : are encoded as %3A or %3a are scrubbed
"error dialing relay: wss://snowflake.torproject.net/?client_ip=6201%3ac8%3A3004%3A%3A1234",
"error dialing relay: wss://snowflake.torproject.net/?client_ip=[scrubbed]\n",
},
} {
var buff bytes.Buffer
log.SetFlags(0) //remove all extra log output for test comparisons