From 76df3798e423d4306368b964c9dd61ae5abc822b Mon Sep 17 00:00:00 2001 From: Giovanni Pellerano Date: Mon, 11 Dec 2023 12:52:50 +0100 Subject: [PATCH] Fix issue #3855 --- backend/globaleaks/rest/api.py | 5 +++-- client/cypress/e2e/15-test-admin-configure-network.js | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/globaleaks/rest/api.py b/backend/globaleaks/rest/api.py index 5d280b1ac1..f9a1f5ac16 100644 --- a/backend/globaleaks/rest/api.py +++ b/backend/globaleaks/rest/api.py @@ -304,8 +304,9 @@ def render(self, request): request.client_using_mobile = re.search(b'Mobi|Android', request.client_ua, re.IGNORECASE) is not None - if (not State.tenants[1].cache.wizard_done or - request.hostname == b'localhost'): + if not State.tenants[1].cache.wizard_done or \ + request.hostname == b'localhost' or \ + (State.tenants[1].cache.hostname == '' and isIPAddress(request.hostname)): request.tid = 1 else: request.tid = State.tenant_hostname_id_map.get(request.hostname, None) diff --git a/client/cypress/e2e/15-test-admin-configure-network.js b/client/cypress/e2e/15-test-admin-configure-network.js index bee6254a1c..2651fd904e 100644 --- a/client/cypress/e2e/15-test-admin-configure-network.js +++ b/client/cypress/e2e/15-test-admin-configure-network.js @@ -11,7 +11,6 @@ describe("admin configure network", () => { cy.get('[name="hostname"]').clear().type("localhost"); cy.get('button:contains("Save")').first().click(); - //cy.waitForLoader(); cy.get("#HTTPSManualMode").click(); // Generate key