mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Prevent loading of extensions outside of the expansions folder using the register command
This commit is contained in:
parent
e862abe0b4
commit
b4e60b7db5
@ -54,7 +54,7 @@ public final class CommandExpansionRegister extends PlaceholderCommand {
|
||||
final LocalExpansionManager manager = plugin.getLocalExpansionManager();
|
||||
|
||||
final File file = new File(manager.getExpansionsFolder(), params.get(0));
|
||||
if (!file.exists()) {
|
||||
if (!file.exists() || !file.getParentFile().equals(manager.getExpansionsFolder())) {
|
||||
Msg.msg(sender,
|
||||
"&cThe file &f" + file.getName() + "&c doesn't exist!");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user