1
0
mirror of https://github.com/dani/vroom.git synced 2024-06-01 21:11:41 +02:00

Reject uninitialized room names

This commit is contained in:
Daniel Berteaud 2015-03-17 16:56:35 +01:00
parent c9e37c8ab8
commit 3e2fbbcd11

View File

@ -123,7 +123,7 @@ helper valid_room_name => sub {
my @reserved = qw(about help feedback feedback_thanks goodbye admin localize api
missing dies password kicked invitation js css img fonts snd
documentation);
if ($name !~ m/^[\w\-]{1,49}$/ || grep { $name eq $_ } @reserved){
if (!$name || $name !~ m/^[\w\-]{1,49}$/ || grep { $name eq $_ } @reserved){
return 0;
}
return 1;