kopia lustrzana https://gitlab.com/eliggett/wfview
Fix for blank username/password in server
rodzic
59234f25f7
commit
93ec46e077
|
@ -318,7 +318,8 @@ void udpServer::controlReceived()
|
|||
passcode(user.username, usercomp);
|
||||
QByteArray passcomp;
|
||||
passcode(user.password, passcomp);
|
||||
if (!strcmp(in->username, usercomp.constData()) && (!strcmp(in->password, user.password.toUtf8()) || !strcmp(in->password, passcomp.constData())))
|
||||
if (!user.username.trimmed().isEmpty() && !user.password.trimmed().isEmpty() && !strcmp(in->username, usercomp.constData()) &&
|
||||
(!strcmp(in->password, user.password.toUtf8()) || !strcmp(in->password, passcomp.constData())))
|
||||
{
|
||||
current->isAuthenticated = true;
|
||||
current->user = user;
|
||||
|
|
Ładowanie…
Reference in New Issue