mirror of
https://github.com/SPAWNRYS-ban/FUCK-CustomDiscs.git
synced 2026-03-26 20:28:12 +05:00
Vulnerability Fix
This version patches a directory traversal vulerability.
This commit is contained in:
@@ -53,6 +53,10 @@ public class CreateCommand extends SubCommand {
|
||||
//Find file, if file not there then say "file not there"
|
||||
String songname = "";
|
||||
String filename = args[1];
|
||||
if (filename.contains("../")) {
|
||||
player.sendMessage(ChatColor.RED + "This is an invalid filename!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (customName(readQuotes(args)).equalsIgnoreCase("")) {
|
||||
player.sendMessage(ChatColor.RED + "You must provide a name for your disc.");
|
||||
|
||||
Reference in New Issue
Block a user