Also remove option to shorten urls for schematic upload. This option does not work with self hosted interfaces, nor is it really safe to use, as per-design.
This commit is contained in:
NotMyFault 2021-05-11 20:16:54 +02:00
parent 00d689a238
commit 2b0ab1a084
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
3 changed files with 5 additions and 23 deletions

View File

@ -409,11 +409,6 @@ public class Settings extends Config {
}
public static class WEB {
@Comment({
"Should download urls be shortened?",
" - Links are less secure as they could be brute forced"
})
public boolean SHORTEN_URLS = false;
@Comment({
"The web interface for clipboards",
" - All schematics are anonymous and private",
@ -430,7 +425,7 @@ public class Settings extends Config {
})
public List<String> ALLOWED_PLUGINS = new ArrayList<>();
@Comment("Should debug messages be sent when third party extents are used?")
public boolean DEBUG = false;
public boolean DEBUG = true;
}
@Comment("Generic tick limiter (not necessarily WorldEdit related, but useful to stop abuse)")

View File

@ -243,16 +243,12 @@ public class EditSessionBuilder {
if (Settings.IMP.EXTENT.DEBUG) {
if (event.getActor() != null) {
event.getActor().printDebug(TextComponent.of("Potentially unsafe extent blocked: " + toReturn.getClass().getName()));
event.getActor().printDebug(TextComponent.of(" - For area restrictions, it is recommended to use the FaweAPI"));
event.getActor().printDebug(TextComponent.of(" - For block logging, it is recommended to use BlocksHub"));
event.getActor().printDebug(TextComponent.of(" - To allow this plugin add it to the FAWE `allowed-plugins` list"));
event.getActor().printDebug(TextComponent.of(" - To hide this message set `debug` to false in the FAWE config.yml"));
event.getActor().printDebug(TextComponent.of(" - For area restrictions and block logging, it is recommended to use the FaweAPI"));
event.getActor().printDebug(TextComponent.of(" - To allow this plugin add it to the FAWE `allowed-plugins` list in config.yml"));
} else {
LOGGER.debug("Potentially unsafe extent blocked: " + toReturn.getClass().getName());
LOGGER.debug(" - For area restrictions, it is recommended to use the FaweAPI");
LOGGER.debug(" - For block logging, it is recommended to use BlocksHub");
LOGGER.debug(" - To allow this plugin add it to the FAWE `allowed-plugins` list");
LOGGER.debug(" - To hide this message set `debug` to false in the FAWE config.yml");
LOGGER.debug(" - For area restrictions and block logging, it is recommended to use the FaweAPI");
LOGGER.debug(" - To allow this plugin, add it to the FAWE `allowed-plugins` list in config.yml");
}
}
}

View File

@ -90,7 +90,6 @@ import java.io.IOException;
import java.io.OutputStream;
import java.net.URI;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.util.HashSet;
import java.util.List;
@ -101,7 +100,6 @@ import java.util.zip.ZipOutputStream;
import static com.sk89q.worldedit.command.util.Logging.LogMode.PLACEMENT;
import static com.sk89q.worldedit.command.util.Logging.LogMode.REGION;
/**
* Clipboard commands.
*/
@ -386,13 +384,6 @@ public class ClipboardCommands {
player.print(Caption.of("fawe.web.generating.link.failed"));
} else {
String urlText = url.toString();
if (Settings.IMP.WEB.SHORTEN_URLS) {
try {
urlText = MainUtil.getText("https://athion.net/s/?" + URLEncoder.encode(url.toString(), "UTF-8"));
} catch (IOException e) {
e.printStackTrace();
}
}
player.print(Caption.of("fawe.web.download.link", urlText).clickEvent(ClickEvent.openUrl(urlText)));
}
}