From ceefe367562f973c15f699bbcebb2a83064dae82 Mon Sep 17 00:00:00 2001 From: VolodymyrBg Date: Sun, 8 Mar 2026 22:33:06 +0200 Subject: [PATCH] docs: clarify Telegram token regex constraint --- agent/redact.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,})", )