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
4a85d6d1
Commit
4a85d6d1
authored
Jun 25, 2010
by
Reed Loden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 562475 - "Bugzilla should use strict-transport-security (STS) headers"
[r=mkanat a=mkanat]
parent
d386a4e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
CGI.pm
Bugzilla/CGI.pm
+6
-0
Constants.pm
Bugzilla/Constants.pm
+5
-0
No files found.
Bugzilla/CGI.pm
View file @
4a85d6d1
...
@@ -285,6 +285,12 @@ sub header {
...
@@ -285,6 +285,12 @@ sub header {
unshift
(
@_
,
'-cookie'
=>
$self
->
{
Bugzilla_cookie_list
});
unshift
(
@_
,
'-cookie'
=>
$self
->
{
Bugzilla_cookie_list
});
}
}
# Add Strict-Transport-Security (STS) header if this response
# is over SSL and ssl_redirect is enabled.
if
(
$self
->
https
&&
Bugzilla
->
params
->
{
'ssl_redirect'
})
{
unshift
(
@_
,
'-strict-transport-security'
=>
'max-age='
.
MAX_STS_AGE
);
}
return
$self
->
SUPER::
header
(
@_
)
||
""
;
return
$self
->
SUPER::
header
(
@_
)
||
""
;
}
}
...
...
Bugzilla/Constants.pm
View file @
4a85d6d1
...
@@ -160,6 +160,7 @@ use File::Basename;
...
@@ -160,6 +160,7 @@ use File::Basename;
MAX_LOGINCOOKIE_AGE
MAX_LOGINCOOKIE_AGE
MAX_LOGIN_ATTEMPTS
MAX_LOGIN_ATTEMPTS
LOGIN_LOCKOUT_INTERVAL
LOGIN_LOCKOUT_INTERVAL
MAX_STS_AGE
SAFE_PROTOCOLS
SAFE_PROTOCOLS
LEGAL_CONTENT_TYPES
LEGAL_CONTENT_TYPES
...
@@ -421,6 +422,10 @@ use constant MAX_LOGIN_ATTEMPTS => 5;
...
@@ -421,6 +422,10 @@ use constant MAX_LOGIN_ATTEMPTS => 5;
# account is locked.
# account is locked.
use
constant
LOGIN_LOCKOUT_INTERVAL
=>
30
;
use
constant
LOGIN_LOCKOUT_INTERVAL
=>
30
;
# The maximum number of seconds the Strict-Transport-Security header
# will remain valid. Default is one week.
use
constant
MAX_STS_AGE
=>
604800
;
# Protocols which are considered as safe.
# Protocols which are considered as safe.
use
constant
SAFE_PROTOCOLS
=>
(
'afs'
,
'cid'
,
'ftp'
,
'gopher'
,
'http'
,
'https'
,
use
constant
SAFE_PROTOCOLS
=>
(
'afs'
,
'cid'
,
'ftp'
,
'gopher'
,
'http'
,
'https'
,
'irc'
,
'mid'
,
'news'
,
'nntp'
,
'prospero'
,
'telnet'
,
'irc'
,
'mid'
,
'news'
,
'nntp'
,
'prospero'
,
'telnet'
,
...
...
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