factors: strip port for domain check
This commit is contained in:
		| @ -15,7 +15,7 @@ class OverviewView(LoginRequiredMixin, TemplateView): | |||||||
|  |  | ||||||
|     def get_context_data(self, **kwargs): |     def get_context_data(self, **kwargs): | ||||||
|         kwargs["applications"] = [] |         kwargs["applications"] = [] | ||||||
|         for application in Application.objects.all().order_by('name'): |         for application in Application.objects.all().order_by("name"): | ||||||
|             engine = PolicyEngine( |             engine = PolicyEngine( | ||||||
|                 application.policies.all(), self.request.user, self.request |                 application.policies.all(), self.request.user, self.request | ||||||
|             ) |             ) | ||||||
|  | |||||||
| @ -53,6 +53,8 @@ class AuthenticationView(UserPassesTestMixin, View): | |||||||
|         """Checks if current request's domain matches configured Domain, and |         """Checks if current request's domain matches configured Domain, and | ||||||
|         adds a warning if not.""" |         adds a warning if not.""" | ||||||
|         current_domain = self.request.get_host() |         current_domain = self.request.get_host() | ||||||
|  |         if ":" in current_domain: | ||||||
|  |             current_domain, _ = current_domain.split(":") | ||||||
|         config_domain = CONFIG.y("domain") |         config_domain = CONFIG.y("domain") | ||||||
|         if current_domain != config_domain: |         if current_domain != config_domain: | ||||||
|             message = ( |             message = ( | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer