projects
/
mirror
/
userdir-ldap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
98e2080
)
ud-useradd: Properly encode realname in subjects and to header lines regardless of...
author
Peter Palfrader
<peter@palfrader.org>
Sat, 9 Jan 2010 11:01:38 +0000
(12:01 +0100)
committer
Peter Palfrader
<peter@palfrader.org>
Sat, 9 Jan 2010 11:01:38 +0000
(12:01 +0100)
debian/changelog
patch
|
blob
|
history
templates/welcome-message
patch
|
blob
|
history
templates/welcome-message-60000
patch
|
blob
|
history
templates/welcome-message-800
patch
|
blob
|
history
ud-useradd
patch
|
blob
|
history
diff --git
a/debian/changelog
b/debian/changelog
index
a73095c
..
d08eb5a
100644
(file)
--- a/
debian/changelog
+++ b/
debian/changelog
@@
-13,8
+13,10
@@
userdir-ldap (0.3.76xXx) unstable; urgency=low
by ud-ldap. (defaults to true.)
* Fix welcome-message to be like welcome-message-800 and 60000 wrt
email headers
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
userdir-ldap (0.3.75) unstable; urgency=low
diff --git
a/templates/welcome-message
b/templates/welcome-message
index
017528e
..
fbf25aa
100644
(file)
--- a/
templates/welcome-message
+++ b/
templates/welcome-message
@@
-1,9
+1,9
@@
-To: "__REALNAME__" <__EMAIL__>
+To: "__
ENCODED_
REALNAME__" <__EMAIL__>
From: __WHOAMI__
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
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__
Cc: new-maintainer@debian.org
Reply-To: new-maintainer@debian.org
Date: __DATE__
diff --git
a/templates/welcome-message-60000
b/templates/welcome-message-60000
index
dbc377f
..
e056189
100644
(file)
--- a/
templates/welcome-message-60000
+++ b/
templates/welcome-message-60000
@@
-1,8
+1,8
@@
-To: "__REALNAME__" <__EMAIL__>
+To: "__
ENCODED_
REALNAME__" <__EMAIL__>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
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__
Cc: debian-admin@lists.debian.org
Reply-To: debian-admin@lists.debian.org
Date: __DATE__
diff --git
a/templates/welcome-message-800
b/templates/welcome-message-800
index
d9e7f2d
..
347ad5f
100644
(file)
--- a/
templates/welcome-message-800
+++ b/
templates/welcome-message-800
@@
-1,9
+1,9
@@
-To: "__REALNAME__" <__EMAIL__>
+To: "__
ENCODED_
REALNAME__" <__EMAIL__>
From: __WHOAMI__
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
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__
Cc: da-manager@debian.org, debian-admin@debian.org
Reply-To: da-manager@debian.org
Date: __DATE__
diff --git
a/ud-useradd
b/ud-useradd
index
243443f
..
3b3e3a8
100755
(executable)
--- a/
ud-useradd
+++ b/
ud-useradd
@@
-243,21
+243,13
@@
if Res != "yes":
# Initialize the substitution Map
Subst = {}
# Initialize the substitution Map
Subst = {}
-enc
to
= ''
+enc
realname
= ''
try:
try:
- enc
to
= FullName.decode('us-ascii')
+ enc
realname
= FullName.decode('us-ascii')
except UnicodeError:
except UnicodeError:
- enc
to = str(email.Header.Header(FullName, 'utf-8', 200)) + " " + emailaddr
+ enc
realname = 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()));
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()));