thortex / rpi3-webiopi

WebIOPi for Raspberry Pi 1, 2, 3, and zero
https://thortex.github.io/rpi3-webiopi/
Apache License 2.0
60 stars 20 forks source link

Issue #123 [New/open] - Python client basic authentication broken for Python 3 #11

Open thortex opened 8 years ago

thortex commented 8 years ago

Posted by andreas.riegg

As the title says ...

Problem/discussion/patch is here:

https://groups.google.com/d/msg/webiopi/-GqmiJdPo2g/5AibryoT\_A8J

Workaround:

.../python/webiopi/clients/init.py

change line 43 from :

self.auth = "Basic " + encodeCredentials(login, password)

to :

self.auth = b'Basic ' + encodeCredentials(login, password)

As Python 2 just ignores the b'something' this patch will not cause problems for Python 2 clients.

However, this patch just cures the symptoms for now, maybe the final bugfix is better suited in crypto.py or somewhere else.

Andreas