-
Notifications
You must be signed in to change notification settings - Fork 27
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
Phone numbers are exposed in the userbot tokens #48
Comments
close? |
@andrew-ld the underlying issue of exposing the phone numbers for tokens isn't solved.
|
I suggest generating a random number 2^32 > n >= 2^31 (so it's not a valid tg id) and using that as the id part of the token, and then putting the phone number in the bot token. To ensure there is no confusion, the first of the 2 version bytes can be set to a magic number for tdlight. |
@penn5 That would be a good compromise. |
@spontanurlaub Thoughts? |
I first tried to create a token with the user_id after the login, but I couldnt get it to work "moving" the tdlib instance to a new token after it was created. We could of course use a random number in the id part, but I actually like the phone number there cause I have to work with a bunch of tokens and without it it is hard to tell which token belongs to which account without calling getMe. The token should be kept secret anyway, so having the phone number there is not a problem. Apart from the stats page (what is fixed now) I'm not aware of any place where the bot token or a part of it are displayed. |
First of all it does it differently from the bots, where the id of the bot is everything in front of the colon
:
.Additionally it exposes the phone number at several places which is not needed, or even a security concern.
One example is the stats page, where it now incorrectly gets listed as id of the account.
Additionally it is included in every request where probably the anonymous user id would be a perfectly fine replacement.
The text was updated successfully, but these errors were encountered: