From df362dd9ea6611b4d04d6f2e4e723fc50ad358be Mon Sep 17 00:00:00 2001 From: Jens L Date: Mon, 14 Feb 2022 12:02:51 +0100 Subject: [PATCH] core: handle error when formatting launch URL fails closes #2304 --- authentik/core/api/applications.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/authentik/core/api/applications.py b/authentik/core/api/applications.py index dcbb41017..68101e799 100644 --- a/authentik/core/api/applications.py +++ b/authentik/core/api/applications.py @@ -56,7 +56,11 @@ class ApplicationSerializer(ModelSerializer): if isinstance(user, SimpleLazyObject): user._setup() user = user._wrapped - return url % user.__dict__ + try: + return url % user.__dict__ + except ValueError as exc: + LOGGER.warning("Failed to format launch url", exc=exc) + return url class Meta: