dumpmon icon indicating copy to clipboard operation
dumpmon copied to clipboard

FIX: lib/regexes.py update 'telegram_bot' regular expression.

Open st1vms opened this issue 4 years ago • 0 comments

I came along this repository by searching for a Telegram Bot API token regular expression. After checking the token format from a SO answer, i found a possible incorrectness in the 'telegram_bot' regex format.

In lib/regexes.py line 15:

change the regex from:

r'\d{9}:[0-9A-Za-z_-]{35}'

to:

r'^[0-9]{8,10}:[0-9A-Za-z_-]{35}$'

The line was last edited on this issue -> #15

The related SO answer ( which i also later adjusted ) is this https://stackoverflow.com/questions/61868770/tegram-bot-api-token-format

st1vms avatar Dec 29 '21 12:12 st1vms