FedericoCeratto/bottle-cork

Login method tries to encode bytes type (v0.12.0a1)

Closed this issue · 5 comments

In Python 3:
The login method works as expected when loading data from the backend, because the hash is loaded as a string. However if you for example, use the reset_password method, then the hash is stored in self._store.users as a bytes instance. The login method then tries to encode the bytes hash, which will fail until the server is restarted and the data is loaded from the backend.

I have illustrated a simple fix for this on my fork at commit:cea0f2da06127a457d803e0aa1643f835ade1411

@joetodd109 Can you please test if the branch "87" works for you now. I added a simple test; more thorough tests would be welcome.

@FedericoCeratto Branch 87 passes my tests!
Thanks, Joe

@joetodd109 fix released in version 0.12.0a2

There is still a lingering bug impacting Postgresql on Py3 only.

On May 1, 2015 10:59:48 AM GMT+01:00, joetodd109 notifications@github.com wrote:

Branch 87 passes my tests!
Thanks, Joe


Reply to this email directly or view it on GitHub:
#87 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.