diff options
author | lpsolit%gmail.com <> | 2009-11-26 00:57:53 +0100 |
---|---|---|
committer | lpsolit%gmail.com <> | 2009-11-26 00:57:53 +0100 |
commit | c0ab2bbac2c7b7265e26a158672d9940d21b4cdc (patch) | |
tree | 02c45c63a50183d58a4900ab8e88e1d33ecf0802 /Bugzilla | |
parent | cf0742d1dc6034fa6c30af66020f9a4d9b40e4b2 (diff) | |
download | bugzilla-c0ab2bbac2c7b7265e26a158672d9940d21b4cdc.tar.gz bugzilla-c0ab2bbac2c7b7265e26a158672d9940d21b4cdc.tar.xz |
Bug 329638: https login page switches to http on submit if ssl_redirect = false - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Util.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 48ac06502..00f9b0a05 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -277,7 +277,16 @@ sub correct_urlbase { my $urlbase = Bugzilla->params->{'urlbase'}; my $sslbase = Bugzilla->params->{'sslbase'}; - return ($ssl && $sslbase) ? $sslbase : $urlbase; + if (!$sslbase) { + return $urlbase; + } + elsif ($ssl) { + return $sslbase; + } + else { + # Return what the user currently uses. + return (uc($ENV{HTTPS} || '') eq 'ON') ? $sslbase : $urlbase; + } } sub use_attachbase { |