From 0b389ec4fffbf6ead17a0a539874df7e1195b44b Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 27 Jun 2016 13:37:52 -0400 Subject: [PATCH 1/2] Fix handling of ports in setup tool redirect Fixes #1581 --- static/js/pages/setup.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/static/js/pages/setup.js b/static/js/pages/setup.js index 036adbe31..cbd539c16 100644 --- a/static/js/pages/setup.js +++ b/static/js/pages/setup.js @@ -141,7 +141,14 @@ $scope.showSuperuserPanel = function() { $('#setupModal').modal('hide'); var prefix = $scope.hasSSL ? 'https' : 'http'; - var hostname = $scope.hostname || document.location.hostname; + var hostname = $scope.hostname; + if (!hostname) { + hostname = document.location.hostname; + if (document.location.port) { + hostname = hostname + ':' + document.location.port; + } + } + window.location = prefix + '://' + hostname + '/superuser'; }; From 2983195a4ae70e3ce906ee3bf63e4fab0bd4637b Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 27 Jun 2016 13:38:11 -0400 Subject: [PATCH 2/2] Fix OAuth key not found error for Dex Fixes #1582 --- util/config/oauth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/config/oauth.py b/util/config/oauth.py index 4e01f713e..e28ca73f5 100644 --- a/util/config/oauth.py +++ b/util/config/oauth.py @@ -265,7 +265,7 @@ class OIDCConfig(OAuthConfig): self._http_client = config['HTTPCLIENT'] if self.config.get('OIDC_SERVER'): - self._load_via_discovery(config['DEBUGGING']) + self._load_via_discovery(config.get('DEBUGGING', False)) def _load_via_discovery(self, is_debugging): oidc_server = self.config['OIDC_SERVER']