socialwifi / RouterOS-api

Python API to RouterBoard devices produced by MikroTik.
MIT License
258 stars 98 forks source link

Fixed crash during connection with 'plaintext_login' option #94

Open Njinx opened 5 months ago

Njinx commented 5 months ago

If 'plaintext_login' is enabled then the username and password will be .encode()'d twice in login(). This PR removes type ambiguity of the username and password in __init__() and consolidates the login() type casts.

I'm not very familiar with the RouterOS protocol but based on my testing the encoding of the username and password doesn't differ depending on whether 'plaintext_login' is used.