From e4ce4b96786b50228aef0503d256d80475a43867 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 14 May 2014 17:46:18 +0200 Subject: [PATCH] Check if room exists in the goodbye route --- public/vroom.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/vroom.pl b/public/vroom.pl index 8b17483..4524a80 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -306,6 +306,13 @@ get 'feedback_thanks' => 'feedback_thanks'; get '/goodby/(:room)' => sub { my $self = shift; my $room = $self->stash('room'); + if (!$self->get_room($room)){ + return $self->render('error', + err => 'ERROR_ROOM_s_DOESNT_EXIST', + msg => sprintf ($self->l("ERROR_ROOM_s_DOESNT_EXIST"), $room), + room => $room + ); + } $self->remove_participant($room,$self->session('name')); $self->logout; } => 'goodby';