Allow port in homeserver URL

Allow to use homeserver URL with port (e.g. ':443').
This commit is contained in:
dklimpel 2020-05-04 19:57:10 +02:00
parent 1002b6464a
commit 61025daab7

View File

@ -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");
}
}