removed dummy auth plugin, fixed invisibility hack

This commit is contained in:
LAX1DUDE 2022-01-08 23:06:15 -08:00
parent b18f5f7625
commit 1da594e102
6 changed files with 17 additions and 8 deletions

View File

@ -173,7 +173,7 @@ public class BungeeCord extends ProxyServer {
this.config.load();
this.pluginManager.detectPlugins(this.pluginsFolder);
this.pluginManager.addInternalPlugin(new PluginEaglerSkins());
if(this.config.getAuthInfo().isEnabled()) this.pluginManager.addInternalPlugin(new PluginEaglerAuth());
//if(this.config.getAuthInfo().isEnabled()) this.pluginManager.addInternalPlugin(new PluginEaglerAuth());
if (this.reconnectHandler == null) {
this.reconnectHandler = new SQLReconnectHandler();
}

View File

@ -73,6 +73,7 @@ public class YamlConfig implements ConfigurationAdapter {
if (groups.isEmpty()) {
groups.put("lax1dude", Collections.singletonList("admin"));
}
/*
final Map<String, Object> auth = this.get("authservice", new HashMap<String, Object>());
if(auth.isEmpty()) {
auth.put("enabled", false);
@ -80,6 +81,7 @@ public class YamlConfig implements ConfigurationAdapter {
auth.put("authfile", "passwords.yml");
auth.put("timeout", 30);
}
*/
}
private <T> T get(final String path, final T def) {
@ -203,7 +205,8 @@ public class YamlConfig implements ConfigurationAdapter {
@Override
public AuthServiceInfo getAuthSettings() {
final Map<String, Object> auth = this.get("authservice", new HashMap<String, Object>());
return new AuthServiceInfo(this.get("enabled", true, auth), this.get("limbo", "lobby", auth), new File(this.get("authfile", "passwords.yml", auth)), this.get("timeout", 30, auth));
//final Map<String, Object> auth = this.get("authservice", new HashMap<String, Object>());
//return new AuthServiceInfo(this.get("enabled", true, auth), this.get("limbo", "lobby", auth), new File(this.get("authfile", "passwords.yml", auth)), this.get("timeout", 30, auth));
return null;
}
}

View File

@ -115,6 +115,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection {
}else if(handshake.getProcolVersion() != 61) {
this.disconnect("minecraft 1.5.2 required for eaglercraft backdoor access");
}
if (handshake.getUsername().length() < 3) {
this.disconnect("Username must be at least 3 characters");
return;
}
if (handshake.getUsername().length() > 16) {
this.disconnect("Cannot have username longer than 16 characters");
return;

View File

@ -18,6 +18,8 @@ public class PluginEaglerSkins extends Plugin implements Listener {
private static final int[] SKIN_DATA_SIZE = new int[] { 64*32*4, 64*64*4, 128*64*4, 128*128*4, 1 };
private static final int VALID_DEFAULT_SKINS = 33;
public PluginEaglerSkins() {
super(new PluginDescription("EaglerSkins", PluginEaglerSkins.class.getName(), "1.0.0", "LAX1DUDE", Collections.emptySet(), null));
}
@ -42,6 +44,11 @@ public class PluginEaglerSkins extends Plugin implements Listener {
if("EAG|MySkin".equals(event.getTag())) {
int t = (int)msg[0] & 0xFF;
if(t >= 0 && t < SKIN_DATA_SIZE.length && msg.length == (SKIN_DATA_SIZE[t] + 1)) {
if(msg.length == 2) {
if(((int)msg[1] & 0xFF) >= VALID_DEFAULT_SKINS) {
msg[1] = 0;
}
}
skinCollection.put(user, msg);
}
}else if("EAG|FetchSkin".equals(event.getTag())) {

View File

@ -14,11 +14,6 @@ stats: 595698b3-9c36-4e86-b1ee-cb3027038f41
groups:
lax1dude:
- admin
authservice:
authfile: passwords.yml
enabled: false
limbo: lobby
timeout: 30
player_limit: -1
permissions:
default: