diff --git a/passbook/core/views/overview.py b/passbook/core/views/overview.py index 54909f144..6185dce05 100644 --- a/passbook/core/views/overview.py +++ b/passbook/core/views/overview.py @@ -15,7 +15,7 @@ class OverviewView(LoginRequiredMixin, TemplateView): def get_context_data(self, **kwargs): kwargs["applications"] = [] - for application in Application.objects.all().order_by('name'): + for application in Application.objects.all().order_by("name"): engine = PolicyEngine( application.policies.all(), self.request.user, self.request ) diff --git a/passbook/factors/view.py b/passbook/factors/view.py index e3702a5a0..eee50cf64 100644 --- a/passbook/factors/view.py +++ b/passbook/factors/view.py @@ -53,6 +53,8 @@ class AuthenticationView(UserPassesTestMixin, View): """Checks if current request's domain matches configured Domain, and adds a warning if not.""" current_domain = self.request.get_host() + if ":" in current_domain: + current_domain, _ = current_domain.split(":") config_domain = CONFIG.y("domain") if current_domain != config_domain: message = (