Closed thejsa closed 5 years ago
Looks like somebody else came up with a neater solution to that problem - so I chose that one instead.
No offence :-)
I'm glad that somebody else is using this - please feel free to raise issues here on github if you find issues or have ideas for ways of extending it - input from others is very much valued :-)
No probs, the other solution certainly does seem neater, I hadn’t thought about trying that (:
Fixes issues when the login arg param, when encoded, ends with an equals sign. (Base64 pads encoded strings such that there are always four bytes for every three source bytes.)
The equals sign is automatically urlencoded somewhere down the line to
%3D
(maybe by requests or urllib3), which would be fine if Arris's firmware could handle something as simple as standard urlencoding, but it can't...Luckily, their base64 decoder is tolerant of encoded strings without the padding, so rather than find a way to pass the arg parameter 'raw', we can just strip the padding from the base64-encoded string and login succeeds.