diff --git a/agent/redact.py b/agent/redact.py index bb7b78ca4..1af6eaa05 100644 --- a/agent/redact.py +++ b/agent/redact.py @@ -59,7 +59,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,})", )