Use 6 months as SSL STS header threshold
* this uses 6 months (6 * 30 * 24 * 60 * 60 = 15552000) * old value was half a year (365 / 2 * 24 * 60 * 60 = 15768000) * fixes #23957
This commit is contained in:
parent
a2da7614a0
commit
e03d289b70
2 changed files with 5 additions and 5 deletions
|
@ -273,7 +273,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var minimumSeconds = 15768000;
|
var minimumSeconds = 15552000;
|
||||||
if(isNaN(transportSecurityValidity) || transportSecurityValidity <= (minimumSeconds - 1)) {
|
if(isNaN(transportSecurityValidity) || transportSecurityValidity <= (minimumSeconds - 1)) {
|
||||||
messages.push({
|
messages.push({
|
||||||
msg: t('core', 'The "Strict-Transport-Security" HTTP header is not configured to at least "{seconds}" seconds. For enhanced security we recommend enabling HSTS as described in our <a href="{docUrl}" rel="noreferrer">security tips</a>.', {'seconds': minimumSeconds, docUrl: '#admin-tips'}),
|
msg: t('core', 'The "Strict-Transport-Security" HTTP header is not configured to at least "{seconds}" seconds. For enhanced security we recommend enabling HSTS as described in our <a href="{docUrl}" rel="noreferrer">security tips</a>.', {'seconds': minimumSeconds, docUrl: '#admin-tips'}),
|
||||||
|
|
|
@ -542,7 +542,7 @@ describe('OC.SetupChecks tests', function() {
|
||||||
|
|
||||||
async.done(function( data, s, x ){
|
async.done(function( data, s, x ){
|
||||||
expect(data).toEqual([{
|
expect(data).toEqual([{
|
||||||
msg: 'The "Strict-Transport-Security" HTTP header is not configured to at least "15768000" seconds. For enhanced security we recommend enabling HSTS as described in our <a href="#admin-tips" rel="noreferrer">security tips</a>.',
|
msg: 'The "Strict-Transport-Security" HTTP header is not configured to at least "15552000" seconds. For enhanced security we recommend enabling HSTS as described in our <a href="#admin-tips" rel="noreferrer">security tips</a>.',
|
||||||
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
|
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
|
||||||
}]);
|
}]);
|
||||||
done();
|
done();
|
||||||
|
@ -555,7 +555,7 @@ describe('OC.SetupChecks tests', function() {
|
||||||
|
|
||||||
suite.server.requests[0].respond(200,
|
suite.server.requests[0].respond(200,
|
||||||
{
|
{
|
||||||
'Strict-Transport-Security': 'max-age=15767999',
|
'Strict-Transport-Security': 'max-age=15551999',
|
||||||
'X-XSS-Protection': '1; mode=block',
|
'X-XSS-Protection': '1; mode=block',
|
||||||
'X-Content-Type-Options': 'nosniff',
|
'X-Content-Type-Options': 'nosniff',
|
||||||
'X-Robots-Tag': 'none',
|
'X-Robots-Tag': 'none',
|
||||||
|
@ -567,7 +567,7 @@ describe('OC.SetupChecks tests', function() {
|
||||||
|
|
||||||
async.done(function( data, s, x ){
|
async.done(function( data, s, x ){
|
||||||
expect(data).toEqual([{
|
expect(data).toEqual([{
|
||||||
msg: 'The "Strict-Transport-Security" HTTP header is not configured to at least "15768000" seconds. For enhanced security we recommend enabling HSTS as described in our <a href="#admin-tips" rel="noreferrer">security tips</a>.',
|
msg: 'The "Strict-Transport-Security" HTTP header is not configured to at least "15552000" seconds. For enhanced security we recommend enabling HSTS as described in our <a href="#admin-tips" rel="noreferrer">security tips</a>.',
|
||||||
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
|
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
|
||||||
}]);
|
}]);
|
||||||
done();
|
done();
|
||||||
|
@ -592,7 +592,7 @@ describe('OC.SetupChecks tests', function() {
|
||||||
|
|
||||||
async.done(function( data, s, x ){
|
async.done(function( data, s, x ){
|
||||||
expect(data).toEqual([{
|
expect(data).toEqual([{
|
||||||
msg: 'The "Strict-Transport-Security" HTTP header is not configured to at least "15768000" seconds. For enhanced security we recommend enabling HSTS as described in our <a href="#admin-tips" rel="noreferrer">security tips</a>.',
|
msg: 'The "Strict-Transport-Security" HTTP header is not configured to at least "15552000" seconds. For enhanced security we recommend enabling HSTS as described in our <a href="#admin-tips" rel="noreferrer">security tips</a>.',
|
||||||
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
|
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
|
||||||
}]);
|
}]);
|
||||||
done();
|
done();
|
||||||
|
|
Loading…
Reference in a new issue