diff --git a/agent/redact.py b/agent/redact.py index 22f1a547f..13e8eba45 100644 --- a/agent/redact.py +++ b/agent/redact.py @@ -47,7 +47,8 @@ _AUTH_HEADER_RE = re.compile( re.IGNORECASE, ) -# Telegram bot tokens: bot: or : +# Telegram bot tokens: bot: or :, +# where token part is restricted to [-A-Za-z0-9_] and length >= 30 _TELEGRAM_RE = re.compile( r"(bot)?(\d{8,}):([-A-Za-z0-9_]{30,})", )