Basic validation of HS URL for reset password

This commit is contained in:
J. Ryan Stinnett 2019-02-07 09:36:43 +00:00
parent 2b7ecd3de7
commit e1b7af39dc
2 changed files with 12 additions and 6 deletions

View file

@ -241,7 +241,12 @@ module.exports = React.createClass({
serverName: parsedHsUrl.hostname,
});
} catch (e) {
// ignore
errorText = <div className="mx_Login_error">{_t(
"The homeserver URL %(hsUrl)s doesn't seem to be valid URL. Please " +
"enter a valid URL including the protocol prefix.",
{
hsUrl: this.state.enteredHsUrl,
})}</div>;
}
// If custom URLs are allowed, wire up the server details edit link.