Skip to content

Commit

Permalink
Sanitize the playlist name
Browse files Browse the repository at this point in the history
  • Loading branch information
lrbn86 committed Feb 13, 2023
1 parent b76f6fa commit 354a0b3
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public MakelistCmd()
protected void execute(CommandEvent event)
{
String pname = event.getArgs().replaceAll("\\s+", "_");
pname = pname.replaceAll("[*?|\\/\":<>]", "");
if(pname == null || pname.isEmpty())
{
event.replyError("Please provide a name for the playlist!");
Expand Down

0 comments on commit 354a0b3

Please sign in to comment.