diff --git a/authentik/lib/generators.py b/authentik/lib/generators.py index 14a7b2f2b..b0f1303d0 100644 --- a/authentik/lib/generators.py +++ b/authentik/lib/generators.py @@ -13,6 +13,6 @@ def generate_key(length=128): """Generate a suitable client secret""" rand = SystemRandom() return "".join( - rand.choice(string.ascii_letters + string.digits + string.punctuation + string.punctuation) + rand.choice(string.ascii_letters + string.digits + string.punctuation) for x in range(length) ) diff --git a/authentik/lib/models.py b/authentik/lib/models.py index 86393e081..795cf8c4b 100644 --- a/authentik/lib/models.py +++ b/authentik/lib/models.py @@ -66,7 +66,7 @@ class DomainlessURLValidator(URLValidator): r"\Z", re.IGNORECASE, ) - self.schemes = ["http", "https", "blank"] + self.schemes = ["http", "https", "blank"] + list(self.schemes) def __call__(self, value): # Check if the scheme is valid.