lib: fix custom URL schemes being overwritten
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
		| @ -13,6 +13,6 @@ def generate_key(length=128): | |||||||
|     """Generate a suitable client secret""" |     """Generate a suitable client secret""" | ||||||
|     rand = SystemRandom() |     rand = SystemRandom() | ||||||
|     return "".join( |     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) |         for x in range(length) | ||||||
|     ) |     ) | ||||||
|  | |||||||
| @ -66,7 +66,7 @@ class DomainlessURLValidator(URLValidator): | |||||||
|             r"\Z", |             r"\Z", | ||||||
|             re.IGNORECASE, |             re.IGNORECASE, | ||||||
|         ) |         ) | ||||||
|         self.schemes = ["http", "https", "blank"] |         self.schemes = ["http", "https", "blank"] + list(self.schemes) | ||||||
|  |  | ||||||
|     def __call__(self, value): |     def __call__(self, value): | ||||||
|         # Check if the scheme is valid. |         # Check if the scheme is valid. | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer