[GH-ISSUE #205] Problem with passwords that contain non-ascii caracters #188

Closed
opened 2026-02-27 11:10:31 +03:00 by kerem · 1 comment
Owner

Originally created by @tonioo on GitHub (Dec 4, 2013).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/205

Originally assigned to: @tonioo on GitHub.

Originally created by Antoine Nguyen on 2011-12-28T10:53:32Z

Passwords that contain non-ascii caracters are translated to unicode strings by python but the crypto module uses strings. The encrypt function padds the clear password to make its length a multiple of 16 but using a unicode object :p

The size of a unicode object is twice the size of a string one so the resulting string lenght is not correct.

Originally created by @tonioo on GitHub (Dec 4, 2013). Original GitHub issue: https://github.com/modoboa/modoboa/issues/205 Originally assigned to: @tonioo on GitHub. **Originally created by Antoine Nguyen on 2011-12-28T10:53:32Z** Passwords that contain non-ascii caracters are translated to unicode strings by python but the crypto module uses strings. The encrypt function padds the clear password to make its length a multiple of 16 but using a unicode object :p The size of a unicode object is twice the size of a string one so the resulting string lenght is not correct.
kerem 2026-02-27 11:10:31 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Redmine Admin on 2011-12-28T12:29:54Z

In [2f5d9dd42083af091a0ed9b05f0d102440357960]:

#!CommitTicketReference repository="" revision="2f5d9dd42083af091a0ed9b05f0d102440357960"
We convert the given password to a string to avoid errors with the crypto module.
fix #193
<!-- gh-comment-id:29814124 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Redmine Admin on 2011-12-28T12:29:54Z** In [2f5d9dd42083af091a0ed9b05f0d102440357960]: <pre> #!CommitTicketReference repository="" revision="2f5d9dd42083af091a0ed9b05f0d102440357960" We convert the given password to a string to avoid errors with the crypto module. fix #193 </pre>
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#188
No description provided.