From: lpsolit%gmail.com <> Date: Thu, 15 Nov 2007 04:50:24 +0000 (+0000) Subject: Bug 183665: Accessing post_bug.cgi directly gives a weird error message and should... X-Git-Tag: bugzilla-3.1.3~468 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec38a93e110be22f7316871994f91dc53712bcd2;p=thirdparty%2Fbugzilla.git Bug 183665: Accessing post_bug.cgi directly gives a weird error message and should redirect to enter_bug.cgi instead - Patch by Matt Tasker (based on the original patch from victory ) r/a=LpSolit --- diff --git a/Bugzilla/Auth/Login/CGI.pm b/Bugzilla/Auth/Login/CGI.pm index 2a61a54f77..980e271239 100644 --- a/Bugzilla/Auth/Login/CGI.pm +++ b/Bugzilla/Auth/Login/CGI.pm @@ -45,7 +45,7 @@ sub get_login_info { my $username = trim($cgi->param("Bugzilla_login")); my $password = $cgi->param("Bugzilla_password"); - $cgi->delete('Bugzilla_login', 'Bugzilla_password'); + $cgi->delete('Bugzilla_login', 'Bugzilla_password', 'GoAheadAndLogIn'); if (!defined $username || !defined $password) { return { failure => AUTH_NODATA }; diff --git a/post_bug.cgi b/post_bug.cgi index 2ef2dcde59..0f23e7d98b 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -53,6 +53,9 @@ my $vars = {}; # Main Script ###################################################################### +# redirect to enter_bug if no field is passed. +print $cgi->redirect(correct_urlbase() . 'enter_bug.cgi') unless $cgi->param(); + # Detect if the user already used the same form to submit a bug my $token = trim($cgi->param('token')); if ($token) {