X Tutup
Skip to content

Commit 574fc8c

Browse files
committed
urllib3: validate https certificate
1 parent b040568 commit 574fc8c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
future
22
urllib3
3+
certifi

telegram/utils/request.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import json
2222

23+
import certifi
2324
import urllib3
2425

2526
from telegram import (InputFile, TelegramError)
@@ -33,7 +34,7 @@ def _get_con_pool():
3334
return _CON_POOL
3435

3536
global _CON_POOL
36-
_CON_POOL = urllib3.PoolManager(10)
37+
_CON_POOL = urllib3.PoolManager(10, cert_reqs='CERT_REQUIRED', ca_certs=certifi.where())
3738
return _CON_POOL
3839

3940

0 commit comments

Comments
 (0)
X Tutup