diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2016-08-25 13:24:50 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2016-08-25 13:24:50 +0200 |
commit | 44f3fcc187ed01a856dbd0ebdb2f2a090072d528 (patch) | |
tree | a1ec06564d28ca26293dc3c441b485ea994d54db | |
parent | 15bda3c57d68860f1da76a9682367719776c7eb9 (diff) | |
download | nextcloud-server-44f3fcc187ed01a856dbd0ebdb2f2a090072d528.tar.gz nextcloud-server-44f3fcc187ed01a856dbd0ebdb2f2a090072d528.zip |
fix internal links in security & setup warnings, resolves #1048
-rw-r--r-- | core/js/setupchecks.js | 5 | ||||
-rw-r--r-- | settings/templates/admin/server.php | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js index 1f18c7b6fa7..936d742ce46 100644 --- a/core/js/setupchecks.js +++ b/core/js/setupchecks.js @@ -263,6 +263,7 @@ var messages = []; if (xhr.status === 200) { + var tipsUrl = OC.generateUrl('settings/admin/tips-tricks'); if(OC.getProtocol() === 'https') { // Extract the value of 'Strict-Transport-Security' var transportSecurityValidity = xhr.getResponseHeader('Strict-Transport-Security'); @@ -278,13 +279,13 @@ var minimumSeconds = 15552000; if(isNaN(transportSecurityValidity) || transportSecurityValidity <= (minimumSeconds - 1)) { 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: tipsUrl}), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } } else { 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: tipsUrl}), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } diff --git a/settings/templates/admin/server.php b/settings/templates/admin/server.php index a15705a90e2..02d247e1b18 100644 --- a/settings/templates/admin/server.php +++ b/settings/templates/admin/server.php @@ -145,7 +145,7 @@ <ul class="warnings hidden"></ul> <ul class="info hidden"></ul> <p class="hint hidden"> - <?php print_unescaped($l->t('Please double check the <a target="_blank" rel="noreferrer" href="%s">installation guides ↗</a>, and check for any errors or warnings in the <a href="#log-section">log</a>.', link_to_docs('admin-install'))); ?> + <?php print_unescaped($l->t('Please double check the <a target="_blank" rel="noreferrer" href="%s">installation guides ↗</a>, and check for any errors or warnings in the <a href="%s">log</a>.', [link_to_docs('admin-install'), \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => 'logging'])] )); ?> </p> </div> <div id="security-warning-state"> |