From 702b8f6c8098155a976e62807c72c4449a8c4f22 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Wed, 14 Nov 2007 22:50:25 +0000 Subject: [PATCH] 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 git-svn-id: svn://10.0.0.236/trunk@239399 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/Bugzilla/Auth/Login/CGI.pm | 2 +- mozilla/webtools/bugzilla/post_bug.cgi | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mozilla/webtools/bugzilla/Bugzilla/Auth/Login/CGI.pm b/mozilla/webtools/bugzilla/Bugzilla/Auth/Login/CGI.pm index 2a61a54f77f..980e2712390 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Auth/Login/CGI.pm +++ b/mozilla/webtools/bugzilla/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/mozilla/webtools/bugzilla/post_bug.cgi b/mozilla/webtools/bugzilla/post_bug.cgi index 2ef2dcde590..0f23e7d98be 100755 --- a/mozilla/webtools/bugzilla/post_bug.cgi +++ b/mozilla/webtools/bugzilla/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) {