diff --git a/modoboa/lib/cryptutils.py b/modoboa/lib/cryptutils.py index 74c1e2657..c98ebff1a 100644 --- a/modoboa/lib/cryptutils.py +++ b/modoboa/lib/cryptutils.py @@ -16,7 +16,8 @@ def random_key(l=16): :param integer l: the key's length :return: a string """ - population = string.digits + string.letters + string.punctuation + punctuation = """!#$%&'()*+,-./:;<=>?@[]^_`{|}~""" + population = string.digits + string.letters + punctuation while True: key = "".join(random.sample(population * l, l)) if len(key) == l: