SteamWar/BauSystem
Archiviert
13
0

Fix WE Security issue

Dieser Commit ist enthalten in:
Lixfel 2020-12-11 15:31:54 +01:00
Ursprung 7f14182b8e
Commit c6e8cad799
2 geänderte Dateien mit 10 neuen und 15 gelöschten Zeilen

Datei anzeigen

@ -86,12 +86,19 @@ public class RegionListener implements Listener {
} }
} }
private static final String[] shortcutCommands = {"//1", "//2", "//90", "//-90", "//180", "//p", "//c", "//flopy", "//floppy", "//flopyp", "//floppyp", "//u", "//r"};
private boolean isWorldEditCommand(String command) { private boolean isWorldEditCommand(String command) {
for(String shortcut : shortcutCommands)
if(command.startsWith(shortcut))
return true;
switch(Core.getVersion()){ switch(Core.getVersion()){
case 15: case 12:
return RegionListener_15.isWorldEditCommand(command);
default:
return RegionListener_12.isWorldEditCommand(command); return RegionListener_12.isWorldEditCommand(command);
case 15:
default:
return RegionListener_15.isWorldEditCommand(command);
} }
} }

Datei anzeigen

@ -33,15 +33,3 @@ commands:
lockschem: lockschem:
detonator: detonator:
aliases: dt aliases: dt
/1:
/2:
/180:
/90:
/-90:
/p:
/c:
/flopy:
/flopyp:
/u:
/r: