diff options
author | Guillermo Ramos | 2019-06-30 13:48:51 +0200 |
---|---|---|
committer | Guillermo Ramos | 2019-06-30 13:48:51 +0200 |
commit | c73cbe96990ae8c671041ca97d0785a46db76375 (patch) | |
tree | 36f3e4991fed7d5eb00f32005cd3c72d460dc928 /lib/TgLib.pm | |
parent | 428615368f7c3c69ad415859162a432cf0866458 (diff) | |
download | tgutils-c73cbe96990ae8c671041ca97d0785a46db76375.tar.gz |
Stricter token regex
Diffstat (limited to 'lib/TgLib.pm')
-rw-r--r-- | lib/TgLib.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/TgLib.pm b/lib/TgLib.pm index 0fcae6c..7631604 100644 --- a/lib/TgLib.pm +++ b/lib/TgLib.pm @@ -13,7 +13,7 @@ sub fetch_token { chomp $token; close $cfg; } - $token =~ /^[0-9]+:[a-zA-Z0-9_-]+$/ or die "Invalid bot token ($token)"; + $token =~ /^[0-9]{9}:[a-zA-Z0-9_-]{35}$/ or die "Invalid bot token ($token)"; return $token; } |