]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix internal links in security & setup warnings, resolves #1048
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Thu, 25 Aug 2016 11:24:50 +0000 (13:24 +0200)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Thu, 25 Aug 2016 11:24:50 +0000 (13:24 +0200)
core/js/setupchecks.js
settings/templates/admin/server.php

index 1f18c7b6fa728c9f2e96763926513f6b650bab45..936d742ce46aab61fc3a73c47a1650f6b6c4ddcb 100644 (file)
                        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');
                                        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
                                        });
                                }
index a15705a90e2d59b6efb52d57b3bb60b3fc205847..02d247e1b18b78c0077476fcb12f9e72e1413f16 100644 (file)
                <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">