Skip to content

Commit

Permalink
other egregious sec removal
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 30, 2017
1 parent d91fe91 commit c14395b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
Expand Up @@ -79,11 +79,7 @@ public void execute(final ScriptEntry scriptEntry) throws CommandExecutionExcept
return;
}

if (!Utilities.isSafeFile(o)) {
dB.echoError(scriptEntry.getResidingQueue(), "Can't copy files from there!");
scriptEntry.addObject("success", new Element("false"));
return;
}
// TODO: Origin is within safe directory path?

if (!Utilities.isSafeFile(d)) {
dB.echoError(scriptEntry.getResidingQueue(), "Can't copy files to there!");
Expand Down
Expand Up @@ -448,10 +448,6 @@ public void serverTag(ReplaceableTagEvent event) {
dB.echoError(e);
return;
}
if (!Utilities.isSafeFile(f)) {
dB.echoError("Invalid path specified. Invalid paths have been denied by the server administrator.");
return;
}
event.setReplaced(new Element(f.exists()).getAttribute(attribute.fulfill(1)));
return;
}
Expand All @@ -478,10 +474,6 @@ public void serverTag(ReplaceableTagEvent event) {
dB.echoError(e);
return;
}
if (!Utilities.isSafeFile(folder)) {
dB.echoError("Invalid path specified. Invalid paths have been denied by the server administrator.");
return;
}
File[] files = folder.listFiles();
if (files == null) {
return;
Expand Down

0 comments on commit c14395b

Please sign in to comment.