[GH-ISSUE #2036] Possible login errors with Python 3 due to passlib issue #1480

Closed
opened 2026-02-27 11:17:19 +03:00 by kerem · 3 comments
Owner

Originally created by @PatTheMav on GitHub (May 23, 2020).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2036

I have no idea how widespread this might be, but there is an issue with passlib in certain scenarios under Python 3:

For some reason cryptography calls on my system return a bytes-like object and not pure strings, which results in a passlib error. Passlib is used by Django e.g. for logging in to modoboa.

I've reported the issue upstream (https://bitbucket.org/ecollins/passlib/issues/113/errors-handling-cryptcrypt-returning-byte), but would require an update in the dependency tree.

For now I fixed this "manually" in my site-packages. Might be a gotcha for PyPy3 installations as well.

Originally created by @PatTheMav on GitHub (May 23, 2020). Original GitHub issue: https://github.com/modoboa/modoboa/issues/2036 I have no idea how widespread this might be, but there is an issue with `passlib` in certain scenarios under Python 3: For some reason cryptography calls on my system return a bytes-like object and not pure strings, which results in a `passlib` error. Passlib is used by `Django` e.g. for logging in to modoboa. I've reported the issue upstream (https://bitbucket.org/ecollins/passlib/issues/113/errors-handling-cryptcrypt-returning-byte), but would require an update in the dependency tree. For now I fixed this "manually" in my site-packages. Might be a gotcha for PyPy3 installations as well.
kerem 2026-02-27 11:17:19 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@PatTheMav commented on GitHub (Oct 14, 2020):

Quick update: Passlib has fixed this in v1.7.3. One possible fix is to force-upgrade passlib to this version.

<!-- gh-comment-id:708541487 --> @PatTheMav commented on GitHub (Oct 14, 2020): Quick update: `Passlib` has fixed this in v1.7.3. One possible fix is to force-upgrade `passlib` to this version.
Author
Owner

@tonioo commented on GitHub (Oct 15, 2020):

@PatTheMav I think this issue should be moved to the main repository. What do you think?

<!-- gh-comment-id:708994497 --> @tonioo commented on GitHub (Oct 15, 2020): @PatTheMav I think this issue should be moved to the main repository. What do you think?
Author
Owner

@PatTheMav commented on GitHub (Oct 15, 2020):

I agree - iirc modoboa itself has the dependency.

<!-- gh-comment-id:709017620 --> @PatTheMav commented on GitHub (Oct 15, 2020): I agree - iirc modoboa itself has the dependency.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1480
No description provided.