by ud-ldap. (defaults to true.)
* Fix welcome-message to be like welcome-message-800 and 60000 wrt
email headers
+ * ud-useradd: Properly encode realname in subjects and to header lines
+ regardless of which template is being used.
- -- Peter Palfrader <weasel@debian.org> Sat, 09 Jan 2010 02:10:02 +0100
+ -- Peter Palfrader <weasel@debian.org> Sat, 09 Jan 2010 11:58:30 +0100
userdir-ldap (0.3.75) unstable; urgency=low
-To: "__REALNAME__" <__EMAIL__>
+To: "__ENCODED_REALNAME__" <__EMAIL__>
From: __WHOAMI__
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
-Subject: __HEADER_SUBJ__
+Subject: New ud-ldap account for __ENCODED_REALNAME__
Cc: new-maintainer@debian.org
Reply-To: new-maintainer@debian.org
Date: __DATE__
-To: "__REALNAME__" <__EMAIL__>
+To: "__ENCODED_REALNAME__" <__EMAIL__>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
-Subject: Debian Guest Account for __REALNAME__
+Subject: Debian Guest Account for __ENCODED_REALNAME__
Cc: debian-admin@lists.debian.org
Reply-To: debian-admin@lists.debian.org
Date: __DATE__
-To: "__REALNAME__" <__EMAIL__>
+To: "__ENCODED_REALNAME__" <__EMAIL__>
From: __WHOAMI__
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
-Subject: New Debian developer __REALNAME__
+Subject: New Debian developer __ENCODED_REALNAME__
Cc: da-manager@debian.org, debian-admin@debian.org
Reply-To: da-manager@debian.org
Date: __DATE__
# Initialize the substitution Map
Subst = {}
-encto = ''
+encrealname = ''
try:
- encto = FullName.decode('us-ascii')
+ encrealname = FullName.decode('us-ascii')
except UnicodeError:
- encto = str(email.Header.Header(FullName, 'utf-8', 200)) + " " + emailaddr
+ encrealname = str(email.Header.Header(FullName, 'utf-8', 200))
-subjstring = "New Debian Maintainer " + FullName
-encsubj = ''
-try:
- encsubj = subjstring.decode('us-ascii')
-except UnicodeError:
- encsubj = str(email.Header.Header(subjstring, 'utf-8', 200))
-
-Subst["__HEADER_SUBJ__"] = encsubj
-Subst["__HEADER_EMAIL"] = encto
+Subst["__ENCODED_REALNAME__"] = encrealname
Subst["__REALNAME__"] = FullName;
Subst["__WHOAMI__"] = pwd.getpwuid(os.getuid())[0];
Subst["__DATE__"] = time.strftime("%a, %d %b %Y %H:%M:%S +0000",time.gmtime(time.time()));