ties/compal_CH7465LG_py

Magenta - issue with login

Closed this issue · 2 comments

thoro commented

Hi,

I got a magenta COMPAL CH7465LG-LC and the login there seems to be a bit different.

Firmware and Hardware:
CH7465LG-NCIP-6.12.18.26-3p7-1-NOSH
5.01

I got the error that no session Id is returned, because the modem returns not a urlencoded string, but something like this:

successful;SID=1025573888

which can't be parsed here:

tokens = urllib.parse.parse_qs(res.text)

Additionally they are using a username of NULL and not admin, which mean that one would need to be configurable!

I've run into this issue and tracked it down to this python issue that was resolved with the latest security updates: https://bugs.python.org/issue42967

Basically the parse_qs method no longer splits on ; to avoid certain cachebusting exploits, but this results in the key being read as successful;SID instead of SID. This ends up making the library think the login failed.

This can be fixed either through introspection as per https://bugs.python.org/msg387756 or by creating a very simple parsing method for this specific piece of data.

Additionally they are using a username of NULL and not admin

I dont think the software actually uses the username for anything, it seems to be arbitrary

ties commented

Hi,

I just released version 0.3.1 which contains the fix by @Kiskae. Thanks for reporting the issue and for the investigation, it should now be fixed.