Sanitize the playlist name
This commit is contained in:
@@ -72,6 +72,7 @@ public class PlaylistCmd extends OwnerCommand
|
|||||||
protected void execute(CommandEvent event)
|
protected void execute(CommandEvent event)
|
||||||
{
|
{
|
||||||
String pname = event.getArgs().replaceAll("\\s+", "_");
|
String pname = event.getArgs().replaceAll("\\s+", "_");
|
||||||
|
pname = pname.replaceAll("[*?|\\/\":<>]", "");
|
||||||
if(pname == null || pname.isEmpty())
|
if(pname == null || pname.isEmpty())
|
||||||
{
|
{
|
||||||
event.replyError("Please provide a name for the playlist!");
|
event.replyError("Please provide a name for the playlist!");
|
||||||
|
|||||||
Reference in New Issue
Block a user