mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-22 07:14:16 +03:00
Дополнительные проверки безопасности
This commit is contained in:
parent
d65a60e61d
commit
72701e0775
2 changed files with 5 additions and 1 deletions
|
@ -71,6 +71,10 @@ public void reply() throws Exception {
|
|||
AuthProvider.authError(server.config.authRejectString);
|
||||
return;
|
||||
}
|
||||
if(!clientData.checkSign)
|
||||
{
|
||||
throw new AuthException("You must using checkLauncher");
|
||||
}
|
||||
result = provider.auth(login, password, ip);
|
||||
if (!VerifyHelper.isValidUsername(result.username)) {
|
||||
AuthProvider.authError(String.format("Illegal result: '%s'", result.username));
|
||||
|
|
|
@ -38,7 +38,7 @@ public void reply() throws IOException {
|
|||
return;
|
||||
}
|
||||
Client clientData = server.sessionManager.getClient(session);
|
||||
if(!clientData.isAuth || clientData.type != Client.Type.USER) { requestError("Assess denied"); return;}
|
||||
if(!clientData.isAuth || clientData.type != Client.Type.USER || clientData.profile == null) { requestError("Assess denied"); return;}
|
||||
for(SignedObjectHolder<ClientProfile> p : server.getProfiles())
|
||||
{
|
||||
ClientProfile profile = p.object;
|
||||
|
|
Loading…
Reference in a new issue