diff options
| author | bwarsaw | 2002-10-05 22:38:35 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-10-05 22:38:35 +0000 |
| commit | 50e458ca3ce7953e6cd169970d47a85818f39e55 (patch) | |
| tree | 2e3891c11a1d863ec1f615926823bbc1e8131e89 /Mailman/Commands/cmd_subscribe.py | |
| parent | 7b07a42bfbbee598b73a790b53bec7f8dcd3ce3d (diff) | |
| download | mailman-50e458ca3ce7953e6cd169970d47a85818f39e55.tar.gz mailman-50e458ca3ce7953e6cd169970d47a85818f39e55.tar.zst mailman-50e458ca3ce7953e6cd169970d47a85818f39e55.zip | |
Diffstat (limited to 'Mailman/Commands/cmd_subscribe.py')
| -rw-r--r-- | Mailman/Commands/cmd_subscribe.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Mailman/Commands/cmd_subscribe.py b/Mailman/Commands/cmd_subscribe.py index f24c5fe89..de5ba73f8 100644 --- a/Mailman/Commands/cmd_subscribe.py +++ b/Mailman/Commands/cmd_subscribe.py @@ -28,6 +28,7 @@ """ from email.Utils import parseaddr +from email.Header import decode_header, make_header from Mailman import Utils from Mailman import Errors @@ -82,6 +83,15 @@ def process(res, args): if not address: res.results.append(_('No valid address found to subscribe')) return STOP + # Watch for encoded names + h = make_header(decode_header(realname)) + # BAW: in Python 2.2, use just unicode(h) + realname = h.__unicode__() + # Coerce to byte string if uh contains only ascii + try: + realname = realname.encode('us-ascii') + except UnicodeError: + pass # Create the UserDesc record and do a non-approved subscription listowner = mlist.GetOwnerEmail() userdesc = UserDesc(address, realname, password, digest) |
