| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Mailman/testing -> Mailman/test
* Removed Mailman/testing/base.py
* Fix mailmanctl by using a different way of calculating where the qrunner
script is. The configuration file no longer knows what BIN_DIR is, but the
mailmanctl script knows where it lives via sys.argv[0]. Also, PREFIX_DIR ->
VAR_DIR.
Also,
* Since the overwhelmingly predominant use of ILanguageManager is to get the
description, and since .get_language_data(code)[0] is not very readable,
split the interface into .get_description() and .get_charset().
* In the setup, automatically add all Mailman.bin modules as command line
scripts.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
scheme. Fix mmsitepass and test cases accordingly. Details:
- set_global_password(): Instead of taking a string for 'scheme' argument,
take None and then coerce that into passwords.Schemes.ssha
- Add a base PasswordError and a BadPasswordSchemeError error that derives
from that. For consistency, multiply inherit MMBadPasswordError and
MMPasswordsMustMatch from PasswordError.
- Add a passwords.lookup_scheme() method which turns scheme_names into scheme
enum constants. It returns None if the lookup fails.
- passwords.py: change the internal representation of _SCHEMES_BY_TAG
dictionary to map scheme names to scheme enum values. Change internal uses
of this dictionary to then turn those enum values into hash classes, or
whatever else we need.
- make_secret(): Raise BadPasswordSchemeErrorif the given schema (which should
be an enum value) is invalid.
- TestBase.tearDown(): Clear out any <site> locks that might hang around after
a test case runs.
|
| | |
|
|
|
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.
|