Skip to content

Commit

Permalink
Fix doc links in the admin settings
Browse files Browse the repository at this point in the history
  • Loading branch information
VicDeo committed Oct 22, 2019
1 parent 822f3e6 commit 9311b07
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/js/setupchecks.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,17 +283,18 @@
transportSecurityValidity = transportSecurityValidity.substring(8);
}
}

var minimumSeconds = 15552000;
if(isNaN(transportSecurityValidity) || transportSecurityValidity <= (minimumSeconds - 1)) {
var docUrl = oc_defaults.docPlaceholderUrl.replace('PLACEHOLDER', 'enable-http-strict-transport-security');
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: docUrl}),
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
});
}
} else {
var docUrl = oc_defaults.docPlaceholderUrl.replace('PLACEHOLDER', 'use-https');
messages.push({
msg: t('core', 'You are accessing this site via HTTP. We strongly suggest you configure your server to require using HTTPS instead as described in our <a href="{docUrl}">security tips</a>.', {docUrl: '#admin-tips'}),
msg: t('core', 'You are accessing this site via HTTP. We strongly suggest you configure your server to require using HTTPS instead as described in our <a href="{docUrl}">security tips</a>.', {docUrl: docUrl}),
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
});
}
Expand Down

0 comments on commit 9311b07

Please sign in to comment.