Fix SSO-login for base urls with explicit port (#337)

This commit is contained in:
Stefan Möhrle 2023-09-05 10:49:24 +02:00 committed by GitHub
parent ec2e7b2ccb
commit ad9a1c502b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -217,7 +217,9 @@ const LoginPage = ({ theme }) => {
_ => { _ => {
if ( if (
!formData.base_url || !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; return;
const versionUrl = `${formData.base_url}/_synapse/admin/v1/server_version`; const versionUrl = `${formData.base_url}/_synapse/admin/v1/server_version`;