lib: fix custom URL schemes being overwritten

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-23 23:23:09 +01:00
parent 6113d7d768
commit 5b9e6bed6c
2 changed files with 2 additions and 2 deletions

View File

@ -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)
)

View File

@ -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.