]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 480862: relogin.cgi now just throws an error by default (should redirect to index...
authorlpsolit%gmail.com <>
Wed, 15 Apr 2009 17:54:34 +0000 (17:54 +0000)
committerlpsolit%gmail.com <>
Wed, 15 Apr 2009 17:54:34 +0000 (17:54 +0000)
relogin.cgi

index a5cea5f91b9012db03b690fccc4a42a9d09c6cc9..40e15ac7e60d0e1856861a4f03dbb36e82d36a73 100755 (executable)
@@ -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);