summaryrefslogtreecommitdiffstats
path: root/relogin.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-04-15 19:52:46 +0200
committerlpsolit%gmail.com <>2009-04-15 19:52:46 +0200
commita09564dd65b9050ed55dd01958fc6cb9f1c37131 (patch)
tree407e16d694c0cff0d68effa78f07647d595a9d8d /relogin.cgi
parentcab5e09a3904889386b219f9144066098a69c21b (diff)
downloadbugzilla-a09564dd65b9050ed55dd01958fc6cb9f1c37131.tar.gz
bugzilla-a09564dd65b9050ed55dd01958fc6cb9f1c37131.tar.xz
Bug 480862: relogin.cgi now just throws an error by default (should redirect to index.cgi) - Patch by Frédéric Buclin <LpSolit@gmail.com> r=ghendricks a=LpSolit
Diffstat (limited to 'relogin.cgi')
-rwxr-xr-xrelogin.cgi8
1 files changed, 6 insertions, 2 deletions
diff --git a/relogin.cgi b/relogin.cgi
index a5cea5f91..40e15ac7e 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);