From a09564dd65b9050ed55dd01958fc6cb9f1c37131 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 15 Apr 2009 17:52:46 +0000 Subject: [PATCH] =?utf8?q?Bug=20480862:=20relogin.cgi=20now=20just=20throw?= =?utf8?q?s=20an=20error=20by=20default=20(should=20redirect=20to=20index.?= =?utf8?q?cgi)=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin?= =?utf8?q?=20=20r=3Dghendricks=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- relogin.cgi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/relogin.cgi b/relogin.cgi index a5cea5f91b..40e15ac7e6 100755 --- a/relogin.cgi +++ b/relogin.cgi @@ -37,13 +37,17 @@ use Date::Format; my $template = Bugzilla->template; my $cgi = Bugzilla->cgi; -my $action = $cgi->param('action'); +my $action = $cgi->param('action') || ''; my $vars = {}; my $target; +if (!$action) { + # redirect to index.cgi if no action is defined. + print $cgi->redirect(correct_urlbase() . 'index.cgi'); +} # prepare-sudo: Display the sudo information & login page -if ($action eq 'prepare-sudo') { +elsif ($action eq 'prepare-sudo') { # We must have a logged-in user to do this # That user must be in the 'bz_sudoers' group my $user = Bugzilla->login(LOGIN_REQUIRED); -- 2.47.2