From 7f16f784f971ba89491a7bff0691d6546c945b60 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Mon, 4 May 2020 21:28:04 +0200 Subject: [PATCH] Allow port in homeserver URL (#40) Allow to use homeserver URL with port (e.g. ':443'). --- 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 984300b..6834625 100644 --- a/src/components/LoginPage.js +++ b/src/components/LoginPage.js @@ -103,7 +103,9 @@ const LoginPage = ({ theme }) => { } else { if (!values.base_url.match(/^(http|https):\/\//)) { errors.base_url = translate("synapseadmin.auth.protocol_error"); - } else if (!values.base_url.match(/^(http|https):\/\/[a-zA-Z0-9\-.]+$/)) { + } else if ( + !values.base_url.match(/^(http|https):\/\/[a-zA-Z0-9\-.]+(:\d{1,5})?$/) + ) { errors.base_url = translate("synapseadmin.auth.url_error"); } }