Refactor login

BUG: 469486
This commit is contained in:
Tobias Fella
2023-05-08 14:29:07 +02:00
parent 16c63dbe93
commit bc4c4f8519
2 changed files with 6 additions and 8 deletions

View File

@@ -38,6 +38,10 @@ void Login::init()
connect(this, &Login::matrixIdChanged, this, [this]() {
setHomeserverReachable(false);
QRegularExpression validator("^\\@?[a-zA-Z0-9\\._=\\-/]+\\:[a-zA-Z0-9\\-]+(\\.[a-zA-Z0-9\\-]+)*(\\:[0-9]+)?$");
if (!validator.match(m_matrixId).hasMatch()) {
return;
}
if (m_matrixId == "@") {
return;