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

TelegramClient.edit_2fa returns invalid value when disabling 2FA with invalid password #4526

Open
3 tasks done
nimaxin opened this issue Jan 2, 2025 · 0 comments
Open
3 tasks done

Comments

@nimaxin
Copy link

nimaxin commented Jan 2, 2025

Code that causes the issue

async with TelegramClient(...) as client:
        result = await client.edit_2fa("invalid password", None)
        print(result) # True

Expected behavior

I encountered an issue when attempting to disable 2FA on an account that does not have 2FA enabled. The method TelegramClient.edit_2fa returns an invalid value when I pass an invalid password instead of None as the current_password parameter.

Steps to Reproduce:

  • Use an account that does not have 2FA enabled.
  • Attempt to disable 2FA using TelegramClient.edit_2fa, providing an invalid password instead of None as the current_password parameter.

Actual behavior

It should return False

Traceback

No response

Telethon version

1.38.1

Python version

3.11.9

Operating system (including distribution name and version)

Ubuntu 24.04

Other details

No response

Checklist

  • The error is in the library's code, and not in my own.
  • I have searched for this issue before posting it and there isn't an open duplicate.
  • I ran pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip and triggered the bug in the latest version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant