Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 08:10:11 +01:00
null safety on auth/handshake errors
Dieser Commit ist enthalten in:
Ursprung
f62aa390d2
Commit
5f93b5bec4
@ -158,8 +158,12 @@ public class GeyserSession implements PlayerSession, Player {
|
||||
public void disconnect(String reason) {
|
||||
if (!closed) {
|
||||
loggedIn = false;
|
||||
downstream.getSession().disconnect(reason);
|
||||
upstream.disconnect(reason);
|
||||
if (downstream != null && downstream.getSession() != null) {
|
||||
downstream.getSession().disconnect(reason);
|
||||
}
|
||||
if (upstream != null) {
|
||||
upstream.disconnect(reason);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,10 +150,13 @@ public class LoginEncryptionUtils {
|
||||
return false;
|
||||
|
||||
CustomFormResponse response = (CustomFormResponse) customFormWindow.getResponse();
|
||||
String email = response.getInputResponses().get(2);
|
||||
String password = response.getInputResponses().get(3);
|
||||
|
||||
session.authenticate(email, password);
|
||||
if (response != null) {
|
||||
String email = response.getInputResponses().get(2);
|
||||
String password = response.getInputResponses().get(3);
|
||||
|
||||
session.authenticate(email, password);
|
||||
}
|
||||
|
||||
// TODO should we clear the window cache in all cases or just if not already logged in?
|
||||
// Clear windows so authentication data isn't accidentally cached
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren