Skip to content

Commit

Permalink
Merge pull request #1078 from ModischFabrications/patch-1
Browse files Browse the repository at this point in the history
Hide token from debug logs
  • Loading branch information
Badiboy authored Jan 17, 2021
2 parents 3799a1e + 3109e35 commit 9c2d279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion telebot/apihelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _make_request(token, method_name, method='get', params=None, files=None):
else:
request_url = "https://api.telegram.org/bot{0}/{1}".format(token, method_name)

logger.debug("Request: method={0} url={1} params={2} files={3}".format(method, request_url, params, files))
logger.debug("Request: method={0} url={1} params={2} files={3}".format(method, request_url, params, files).replace(token, token.split(':')[0] + ":{TOKEN}"))
read_timeout = READ_TIMEOUT
connect_timeout = CONNECT_TIMEOUT
if files and format_header_param:
Expand Down

0 comments on commit 9c2d279

Please sign in to comment.