summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Auth
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2005-01-16 22:09:56 +0100
committerjocuri%softhome.net <>2005-01-16 22:09:56 +0100
commit3b4174f1273818d1a01080ed8a97715c38e74e37 (patch)
treef7e9fe0ae0bae21fa95d877ffeca364ad97eb3e5 /Bugzilla/Auth
parentb36c4ef40718e469d5924721cee4ef15b1a1bf64 (diff)
downloadbugzilla-3b4174f1273818d1a01080ed8a97715c38e74e37.tar.gz
bugzilla-3b4174f1273818d1a01080ed8a97715c38e74e37.tar.xz
Patch for bug 260682: Support redirecting to HTTPS always or for authenticated sessions only; patch by Byron Jones (glob) <bugzilla@glob.com.au>, r=vladd, a=myk.
Diffstat (limited to 'Bugzilla/Auth')
-rw-r--r--Bugzilla/Auth/Login/WWW.pm5
-rw-r--r--Bugzilla/Auth/Login/WWW/CGI.pm6
2 files changed, 11 insertions, 0 deletions
diff --git a/Bugzilla/Auth/Login/WWW.pm b/Bugzilla/Auth/Login/WWW.pm
index 8b7724bef..cc3ae25e2 100644
--- a/Bugzilla/Auth/Login/WWW.pm
+++ b/Bugzilla/Auth/Login/WWW.pm
@@ -70,6 +70,11 @@ sub login {
if ($userid) {
$user = new Bugzilla::User($userid);
+ # Redirect to SSL if required
+ if (Param('sslbase') ne '' and Param('ssl') ne 'never') {
+ Bugzilla->cgi->require_https(Param('sslbase'));
+ }
+
$user->set_flags('can_logout' => $class->can_logout);
# Compat stuff
diff --git a/Bugzilla/Auth/Login/WWW/CGI.pm b/Bugzilla/Auth/Login/WWW/CGI.pm
index a66ce7425..10eb85f60 100644
--- a/Bugzilla/Auth/Login/WWW/CGI.pm
+++ b/Bugzilla/Auth/Login/WWW/CGI.pm
@@ -135,6 +135,12 @@ sub login {
# No login details were given, but we require a login if the
# page does
if ($authres == AUTH_NODATA && $type == LOGIN_REQUIRED) {
+
+ # Redirect to SSL if required
+ if (Param('sslbase') ne '' and Param('ssl') ne 'never') {
+ $cgi->require_https(Param('sslbase'));
+ }
+
# Throw up the login page
print Bugzilla->cgi->header();