Stream name regexp

This commit is contained in:
Simon Vieille 2015-07-14 00:47:32 +02:00
parent 8e20fbb50a
commit eb705fdc78

View file

@ -27,7 +27,7 @@ class PlayCommand extends Command
$config = $this->getApplication()->getConfigLoader()->getConfig();
$stream = strtolower(trim($input->getArgument('stream'), "/ \r\n"));
if (0 === preg_match('/^\w+$/', $stream)) {
if (0 === preg_match('/^[\w-]+$/', $stream)) {
$output->writeln('<error>The stream name is not valid.</error>');
return false;