Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot token may exposed in BASHBOT.log up to v1.40 #174

Closed
gnadelwartz opened this issue Feb 2, 2021 · 2 comments · Fixed by #173
Closed

Bot token may exposed in BASHBOT.log up to v1.40 #174

gnadelwartz opened this issue Feb 2, 2021 · 2 comments · Fixed by #173
Labels
Milestone

Comments

@gnadelwartz
Copy link
Collaborator

gnadelwartz commented Feb 2, 2021

Bot token may exposed in BASHBOT.log

Issue:
Due to a design descion taken in pre 0.8 times get_file() doesn't download a file anymore but returns a download URL containg the full API call incl. bot token. This is not a problem as long the URL is only used to download the file and not exposed.

Unfortunatly logging was extended in V1.2x release to log also file URLs, therefore bot token is visible logs/BASHBOT.log if the bot receives a file, e.g. in a private chat.

Solution:

Logging is changed in Version 1.40 to obfuscate the token. In addtion the internal API will be changed in the next release to no more return full API call from get_file().

Keep your old logfiles in a save place or delete them.

@gnadelwartz gnadelwartz added the bug label Feb 2, 2021
@gnadelwartz gnadelwartz added this to the v1.41 milestone Feb 2, 2021
@gnadelwartz gnadelwartz pinned this issue Feb 2, 2021
@gnadelwartz gnadelwartz changed the title Bot token exposed in BASHBOT.log Bot token exposed in BASHBOT.log until v1.40 Feb 2, 2021
@gnadelwartz gnadelwartz changed the title Bot token exposed in BASHBOT.log until v1.40 Bot token exposed in BASHBOT.log up to v1.40 Feb 2, 2021
@gnadelwartz gnadelwartz linked a pull request Feb 2, 2021 that will close this issue
@gnadelwartz gnadelwartz unpinned this issue Feb 2, 2021
@gnadelwartz gnadelwartz changed the title Bot token exposed in BASHBOT.log up to v1.40 Bot token may exposed in BASHBOT.log up to v1.40 Feb 2, 2021
@gnadelwartz gnadelwartz pinned this issue Feb 2, 2021
@gnadelwartz
Copy link
Collaborator Author

change get_file()

@gnadelwartz gnadelwartz reopened this Feb 5, 2021
@gnadelwartz
Copy link
Collaborator Author

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant