From ad9a1c502be804622707a17e15a236b663ca6f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=B6hrle?= <26185187+smoehrle@users.noreply.github.com> Date: Tue, 5 Sep 2023 10:49:24 +0200 Subject: [PATCH] Fix SSO-login for base urls with explicit port (#337) --- src/components/LoginPage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/LoginPage.js b/src/components/LoginPage.js index 653f5ce..573fd4e 100644 --- a/src/components/LoginPage.js +++ b/src/components/LoginPage.js @@ -217,7 +217,9 @@ const LoginPage = ({ theme }) => { _ => { if ( !formData.base_url || - !formData.base_url.match(/^(http|https):\/\/[a-zA-Z0-9\-.]+$/) + !formData.base_url.match( + /^(http|https):\/\/[a-zA-Z0-9\-.]+(:\d{1,5})?$/ + ) ) return; const versionUrl = `${formData.base_url}/_synapse/admin/v1/server_version`;