From 2affe563929eda6f8c1d2504e49c903bb3f406f2 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sat, 5 Jul 2014 14:43:15 +0200 Subject: [PATCH] Lowercase room name on create --- public/vroom.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/public/vroom.pl b/public/vroom.pl index ed05166..8c25501 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -192,6 +192,7 @@ helper logout => sub { helper create_room => sub { my $self = shift; my ($name,$owner) = @_; + $name = lc $name unless ($name eq lc $name); # Exit if the name isn't valid or already taken return undef if ( $self->get_room($name) || !$self->valid_room_name($name)); my $sth = eval { $self->db->prepare("INSERT INTO `rooms` (`name`,`create_timestamp`,`activity_timestamp`,`owner`,`token`,`realm`) VALUES (?,?,?,?,?,?);") } || return undef;