summaryrefslogtreecommitdiff
path: root/Mailman/Message.py
diff options
context:
space:
mode:
authorbwarsaw2007-03-02 00:07:43 +0000
committerbwarsaw2007-03-02 00:07:43 +0000
commit173997db20a1fad4ec6a78e0c7a88e147869cd7d (patch)
tree30df8131cd8131be4299e0dd23b601b83f6c3600 /Mailman/Message.py
parentc08b190d0b31d09ef25a0e213b719ff337ac533c (diff)
downloadmailman-173997db20a1fad4ec6a78e0c7a88e147869cd7d.tar.gz
mailman-173997db20a1fad4ec6a78e0c7a88e147869cd7d.tar.zst
mailman-173997db20a1fad4ec6a78e0c7a88e147869cd7d.zip
Backport the enum package from the abortive Mailman 3 branch. This lets us
use much nicer identifiers for constants than plain ints or strings. New code using enumerating constants should use subclasses of enum.Enum. Along those lines, the passwords.py module has been rewritten to use enum constants instead of strings. So now e.g. the default password scheme is Mailman.passwords.Schemes.ssha and there are Scheme.pbkdf2 and Scheme.sha (etc) schemes as well. Also, rework the passwords.py implementation to better support unicode passwords. This elaborates on Tokio's r8160 by recognizing that the hash algorithms always operate on byte-strings not on unicodes. Thus if the secret or response are unicodes, encode them to byte-strings via utf-8 before hashing and comparing. Unit tests added for both enums and passwords.
Diffstat (limited to 'Mailman/Message.py')
0 files changed, 0 insertions, 0 deletions