######################################################################
# redirect to enter_bug if no field is passed.
-print $cgi->redirect(correct_urlbase() . 'enter_bug.cgi') unless $cgi->param();
+unless ($cgi->param()) {
+ print $cgi->redirect(correct_urlbase() . 'enter_bug.cgi');
+ exit;
+}
# Detect if the user already used the same form to submit a bug
my $token = trim($cgi->param('token'));
if (!$action) {
# redirect to index.cgi if no action is defined.
print $cgi->redirect(correct_urlbase() . 'index.cgi');
+ exit;
}
# prepare-sudo: Display the sudo information & login page
elsif ($action eq 'prepare-sudo') {