summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-11-26 00:57:53 +0100
committerlpsolit%gmail.com <>2009-11-26 00:57:53 +0100
commitc0ab2bbac2c7b7265e26a158672d9940d21b4cdc (patch)
tree02c45c63a50183d58a4900ab8e88e1d33ecf0802 /Bugzilla
parentcf0742d1dc6034fa6c30af66020f9a4d9b40e4b2 (diff)
downloadbugzilla-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.pm11
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 {