Open flycam opened 2 years ago
Looking into this and how it escaped testing! Thank you for bringing this to our attention 👍
This cookie check in pyaoscx looks almost broken.
I have a setup were an alternative https port is used, this breaks this module. I wonder
CookieJar
class accessed from pyaoscx?
Trying to connect to a device using and IPv6 Address fails with the error:
raise LoginError("Cookies were not set correctly. Login failed")
I did encase the IP Address in square brackets like [2001:db8:1::25], as it is customary for URLs. Without the brackets, I got even more parsing errors.In the file session.py:159 in method open(...): )
the check for connected fails, as for some reason unknown to me the switch returns the cookie with the address
[2001:db8:1::25].local
. This extra .local at the end of the ip fails the test condition.I tried to mitigate by also checking for .local, and that is a workaround for my development machine at the moment.
I would really appreciate a fix for this in the official pypi version (or in aos-cx, whatever is preferred), as plan to run this on ipv6-only networks, and newly deployed switches do not have dns entries yet. If I need to push this via my SE or a support case, please tell me as that would be possible.