Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
f64efa79
Commit
f64efa79
authored
Sep 27, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 594990: Make the Strict-Transport-Security HTTP header only be sent
if a particular parameter is enabled. r=glob, a=mkanat
parent
70757345
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
CGI.pm
Bugzilla/CGI.pm
+2
-2
Advanced.pm
Bugzilla/Config/Advanced.pm
+6
-0
advanced.html.tmpl
template/en/default/admin/params/advanced.html.tmpl
+15
-0
No files found.
Bugzilla/CGI.pm
View file @
f64efa79
...
...
@@ -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
->
{
's
sl_redirect
'
})
{
# is over SSL and
the strict_transport_security param is turned on
.
if
(
$self
->
https
&&
Bugzilla
->
params
->
{
's
trict_transport_security
'
})
{
unshift
(
@_
,
'-strict-transport-security'
=>
'max-age='
.
MAX_STS_AGE
);
}
...
...
Bugzilla/Config/Advanced.pm
View file @
f64efa79
...
...
@@ -52,6 +52,12 @@ use constant get_param_list => (
type
=>
't'
,
default
=>
''
},
{
name
=>
'strict_transport_security'
,
type
=>
'b'
,
default
=>
0
,
},
);
1
;
template/en/default/admin/params/advanced.html.tmpl
View file @
f64efa79
...
...
@@ -24,6 +24,19 @@
desc = "Settings for advanced configurations."
%]
[% sts_desc = BLOCK %]
Enables the sending of the
<a href="http://en.wikipedia.org/wiki/Strict_Transport_Security">Strict-Transport-Security</a>
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 <code>ssl_redirect</code>
parameter turned on, Bugzilla is the only thing running
on its domain (i.e., your <code>urlbase</code> is something like
<code>http://bugzilla.example.com/</code>), and you never plan to disable
the <code>ssl_redirect</code> 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 <code>http://user:pass@proxy_url/</code> syntax.",
strict_transport_security => sts_desc,
} %]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment