From 479540c3acd6da722b89143dbe915f6b35fa2574 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 19 May 2014 11:04:44 +0200 Subject: [PATCH] Fix owner check when room is locked --- public/vroom.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/vroom.pl b/public/vroom.pl index 99e4689..3e0072d 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -535,7 +535,7 @@ get '/(*room)' => sub { # Create a session if not already done $self->login; # If the room is locked and we're not the owner, we cannot join it ! - if ($data->{'locked'} && $self->session($room)->{role} ne 'owner'){ + if ($data->{'locked'} && (!$self->session($room) || !$self->session($room)->{role} || $self->session($room)->{role} ne 'owner')){ return $self->render('error', msg => sprintf($self->l("ERROR_ROOM_s_LOCKED"), $room), err => 'ERROR_ROOM_s_LOCKED',