diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev
index b9ac5ae8258..bcb543c50bc 100644
--- a/mozilla/webtools/bugzilla/.bzrrev
+++ b/mozilla/webtools/bugzilla/.bzrrev
@@ -1 +1 @@
-7489
\ No newline at end of file
+7490
\ No newline at end of file
diff --git a/mozilla/webtools/bugzilla/Bugzilla/CGI.pm b/mozilla/webtools/bugzilla/Bugzilla/CGI.pm
index 295c57bb214..de92cda9992 100644
--- a/mozilla/webtools/bugzilla/Bugzilla/CGI.pm
+++ b/mozilla/webtools/bugzilla/Bugzilla/CGI.pm
@@ -275,8 +275,8 @@ sub header {
}
# Add Strict-Transport-Security (STS) header if this response
- # is over SSL and ssl_redirect is enabled.
- if ($self->https && Bugzilla->params->{'ssl_redirect'}) {
+ # is over SSL and the strict_transport_security param is turned on.
+ if ($self->https && Bugzilla->params->{'strict_transport_security'}) {
unshift(@_, '-strict-transport-security' => 'max-age=' . MAX_STS_AGE);
}
diff --git a/mozilla/webtools/bugzilla/Bugzilla/Config/Advanced.pm b/mozilla/webtools/bugzilla/Bugzilla/Config/Advanced.pm
index 1acf76f38bf..e15a429630c 100644
--- a/mozilla/webtools/bugzilla/Bugzilla/Config/Advanced.pm
+++ b/mozilla/webtools/bugzilla/Bugzilla/Config/Advanced.pm
@@ -52,6 +52,12 @@ use constant get_param_list => (
type => 't',
default => ''
},
+
+ {
+ name => 'strict_transport_security',
+ type => 'b',
+ default => 0,
+ },
);
1;
diff --git a/mozilla/webtools/bugzilla/template/en/default/admin/params/advanced.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/admin/params/advanced.html.tmpl
index 4caa2f1dc56..2414a46fb4f 100644
--- a/mozilla/webtools/bugzilla/template/en/default/admin/params/advanced.html.tmpl
+++ b/mozilla/webtools/bugzilla/template/en/default/admin/params/advanced.html.tmpl
@@ -24,6 +24,19 @@
desc = "Settings for advanced configurations."
%]
+[% sts_desc = BLOCK %]
+ Enables the sending of the
+ Strict-Transport-Security
+ header along with HTTP responses on SSL connections. This adds greater
+ security to your SSL connections by forcing the browser to always
+ access your domain over SSL and never accept an invalid certificate.
+ However, it should only be used if you have the ssl_redirect
+ parameter turned on, Bugzilla is the only thing running
+ on its domain (i.e., your urlbase is something like
+ http://bugzilla.example.com/), and you never plan to disable
+ the ssl_redirect parameter.
+[% END %]
+
[% param_descs = {
cookiedomain =>
"If your website is at 'www.foo.com', setting this to"
@@ -47,4 +60,6 @@
_ " necessary to enter its URL if the web server cannot access the"
_ " HTTP_PROXY environment variable. If you have to authenticate,"
_ " use the http://user:pass@proxy_url/ syntax.",
+
+ strict_transport_security => sts_desc,
} %]