From 659f413860049070cb8f9a6e498950587572a3a1 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Fri, 31 May 2013 14:38:12 +0200 Subject: [PATCH] Don't include whitespaces into generated keys. see #396 --- modoboa/auth/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modoboa/auth/lib.py b/modoboa/auth/lib.py index 38e95382d..8808cd240 100644 --- a/modoboa/auth/lib.py +++ b/modoboa/auth/lib.py @@ -12,7 +12,7 @@ def random_key(l=16): :param integer l: the key's length :return: a string """ - char_set = string.printable + char_set = string.digits + string.letters + string.punctuation return ''.join(random.sample(char_set * l, l))