Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
e034de90
Unverified
Commit
e034de90
authored
May 09, 2021
by
ebbit1q
Committed by
GitHub
May 08, 2021
Browse files
don't log in users while giving them an error for missing the clientid (#4335)
parent
ecf57b42
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/server.cpp
View file @
e034de90
...
...
@@ -85,6 +85,15 @@ AuthenticationResult Server::loginUser(Server_ProtocolHandler *session,
QString
&
clientVersion
,
QString
&
/* connectionType */
)
{
bool
hasClientId
=
false
;
if
(
clientid
.
isEmpty
())
{
// client id is empty, either out dated client or client has been modified
if
(
getClientIDRequiredEnabled
())
return
ClientIdRequired
;
}
else
{
hasClientId
=
true
;
}
if
(
name
.
size
()
>
35
)
name
=
name
.
left
(
35
);
...
...
@@ -164,15 +173,10 @@ AuthenticationResult Server::loginUser(Server_ProtocolHandler *session,
event
.
mutable_user_info
()
->
CopyFrom
(
session
->
copyUserInfo
(
true
,
true
,
true
));
locker
.
unlock
();
if
(
clientid
.
isEmpty
())
{
// client id is empty, either out dated client or client has been modified
if
(
getClientIDRequiredEnabled
())
return
ClientIdRequired
;
}
else
{
if
(
hasClientId
)
{
// update users database table with client id
databaseInterface
->
updateUsersClientID
(
name
,
clientid
);
}
databaseInterface
->
updateUsersLastLoginData
(
name
,
clientVersion
);
se
=
Server_ProtocolHandler
::
prepareSessionEvent
(
event
);
sendIsl_SessionEvent
(
*
se
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment