From 9569df7405317726d7e60911a9c95a755017ac70 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 1 Mar 2021 19:42:34 +0100 Subject: [PATCH 1/3] Add target black and noref rules to doc links Signed-off-by: Joas Schilling --- core/js/setupchecks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js index c483454cb9..9eb9c515f9 100644 --- a/core/js/setupchecks.js +++ b/core/js/setupchecks.js @@ -711,13 +711,13 @@ var minimumSeconds = 15552000; if(isNaN(transportSecurityValidity) || transportSecurityValidity <= (minimumSeconds - 1)) { messages.push({ - msg: t('core', 'The "Strict-Transport-Security" HTTP header is not set to at least "{seconds}" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips ↗.', {'seconds': minimumSeconds, docUrl: tipsUrl}), + msg: t('core', 'The "Strict-Transport-Security" HTTP header is not set to at least "{seconds}" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips ↗.', {'seconds': minimumSeconds, docUrl: tipsUrl}), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } } else { messages.push({ - msg: t('core', 'Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead, as described in the security tips ↗.', {docUrl: tipsUrl}), + msg: t('core', 'Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead, as described in the security tips ↗.', {docUrl: tipsUrl}), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } From 96ae83c529450fdd4f582ad297dabe77c72d3827 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 1 Mar 2021 20:09:44 +0100 Subject: [PATCH 2/3] Remove HTML from setup check translations Signed-off-by: Joas Schilling --- core/js/setupchecks.js | 146 ++++++++++++------------- core/js/tests/specs/setupchecksSpec.js | 42 +++---- 2 files changed, 91 insertions(+), 97 deletions(-) diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js index 9eb9c515f9..665030681f 100644 --- a/core/js/setupchecks.js +++ b/core/js/setupchecks.js @@ -77,7 +77,9 @@ if (expectedStatus.indexOf(xhr.status) === -1 || (checkCustomHeader && !customWellKnown)) { var docUrl = placeholderUrl.replace('PLACEHOLDER', 'admin-setup-well-known-URL'); messages.push({ - msg: t('core', 'Your web server is not properly set up to resolve "{url}". Further information can be found in the documentation.', { docLink: docUrl, url: url }), + msg: t('core', 'Your web server is not properly set up to resolve "{url}". Further information can be found in the {linkstart}documentation ↗{linkend}.', { url: url }) + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_INFO }); } @@ -116,7 +118,9 @@ if (expectedStatus.indexOf(xhr.status) === -1) { var docUrl = placeholderUrl.replace('PLACEHOLDER', 'admin-nginx'); messages.push({ - msg: t('core', 'Your web server is not properly set up to resolve "{url}". This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in ".htaccess" for Apache or the provided one in the documentation for Nginx at it\'s documentation page. On Nginx those are typically the lines starting with "location ~" that need an update.', { docLink: docUrl, url: url }), + msg: t('core', 'Your web server is not properly set up to resolve "{url}". This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in ".htaccess" for Apache or the provided one in the documentation for Nginx at it\'s {linkstart}documentation page ↗{linkend}. On Nginx those are typically the lines starting with "location ~" that need an update.', { docLink: docUrl, url: url }) + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } @@ -148,7 +152,9 @@ if (xhr.status !== 200) { var docUrl = placeholderUrl.replace('PLACEHOLDER', 'admin-nginx'); messages.push({ - msg: t('core', 'Your web server is not properly set up to deliver .woff2 files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustement to also deliver .woff2 files. Compare your Nginx configuration to the recommended configuration in our documentation.', { docLink: docUrl, url: url }), + msg: t('core', 'Your web server is not properly set up to deliver .woff2 files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustement to also deliver .woff2 files. Compare your Nginx configuration to the recommended configuration in our {linkstart}documentation ↗{linkend}.', { docLink: docUrl, url: url }) + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } @@ -177,13 +183,9 @@ if (!data.isGetenvServerWorking) { messages.push({ msg: t('core', 'PHP does not seem to be setup properly to query system environment variables. The test with getenv("PATH") only returns an empty response.') + ' ' + - t( - 'core', - 'Please check the installation documentation ↗ for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm.', - { - docLink: OC.theme.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-php-fpm') - } - ), + t('core', 'Please check the {linkstart}installation documentation ↗{linkend} for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } @@ -207,7 +209,9 @@ } if(!data.hasWorkingFileLocking) { messages.push({ - msg: t('core', 'Transactional file locking is disabled, this might lead to issues with race conditions. Enable "filelocking.enabled" in config.php to avoid these problems. See the documentation ↗ for more information.', {docLink: OC.theme.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-transactional-locking')}), + msg: t('core', 'Transactional file locking is disabled, this might lead to issues with race conditions. Enable "filelocking.enabled" in config.php to avoid these problems. See the {linkstart}documentation ↗{linkend} for more information.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } @@ -244,8 +248,9 @@ } if (data.cronInfo.diffInSeconds > 3600) { messages.push({ - msg: t('core', 'Last background job execution ran {relativeTime}. Something seems wrong.', {relativeTime: data.cronInfo.relativeTime}) + - ' ' + t('core', 'Check the background job settings') + '', + msg: t('core', 'Last background job execution ran {relativeTime}. Something seems wrong. {linkstart}Check the background job settings ↗{linkend}', {relativeTime: data.cronInfo.relativeTime}) + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_ERROR }); } @@ -257,13 +262,17 @@ } if(!data.isMemcacheConfigured) { messages.push({ - msg: t('core', 'No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the documentation.', {docLink: data.memcacheDocs}), + msg: t('core', 'No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the {linkstart}documentation ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_INFO }); } if(!data.isRandomnessSecure) { messages.push({ - msg: t('core', 'No suitable source for randomness found by PHP which is highly discouraged for security reasons. Further information can be found in the documentation.', {docLink: data.securityDocs}), + msg: t('core', 'No suitable source for randomness found by PHP which is highly discouraged for security reasons. Further information can be found in the {linkstart}documentation ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_ERROR }); } @@ -275,7 +284,9 @@ } if (data.phpSupported && data.phpSupported.eol) { messages.push({ - msg: t('core', 'You are currently running PHP {version}. Upgrade your PHP version to take advantage of performance and security updates provided by the PHP Group as soon as your distribution supports it.', { version: data.phpSupported.version, phpLink: 'https://secure.php.net/supported-versions.php' }), + msg: t('core', 'You are currently running PHP {version}. Upgrade your PHP version to take advantage of {linkstart}performance and security updates provided by the PHP Group ↗{linkend} as soon as your distribution supports it.', { version: data.phpSupported.version }) + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_INFO }) } @@ -287,50 +298,42 @@ } if(!data.forwardedForHeadersWorking) { messages.push({ - msg: t('core', 'The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation.', {docLink: data.reverseProxyDocs}), + msg: t('core', 'The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the {linkstart}documentation ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } if(!data.isCorrectMemcachedPHPModuleInstalled) { messages.push({ - msg: t('core', 'Memcached is configured as distributed cache, but the wrong PHP module "memcache" is installed. \\OC\\Memcache\\Memcached only supports "memcached" and not "memcache". See the memcached wiki about both modules.', {wikiLink: 'https://code.google.com/p/memcached/wiki/PHPClientComparison'}), + msg: t('core', 'Memcached is configured as distributed cache, but the wrong PHP module "memcache" is installed. \\OC\\Memcache\\Memcached only supports "memcached" and not "memcache". See the {linkstart}memcached wiki about both modules ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } if(!data.hasPassedCodeIntegrityCheck) { messages.push({ - msg: t( - 'core', - 'Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the documentation. (List of invalid files… / Rescan…)', - { - docLink: data.codeIntegrityCheckerDocumentation, - codeIntegrityDownloadEndpoint: OC.generateUrl('/settings/integrity/failed'), - rescanEndpoint: OC.generateUrl('/settings/integrity/rescan?requesttoken={requesttoken}', {'requesttoken': OC.requestToken}) - } - ), + msg: t('core', 'Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the {linkstart1}documentation ↗{linkend}. ({linkstart2}List of invalid files…{linkend} / {linkstart3}Rescan…{linkend})') + .replace('{linkstart1}', '') + .replace('{linkstart2}', '') + .replace('{linkstart3}', '') + .replace(/{linkend}/g, ''), type: OC.SetupChecks.MESSAGE_TYPE_ERROR }); } if(!data.hasOpcacheLoaded) { messages.push({ - msg: t( - 'core', - 'The PHP OPcache module is not loaded. For better performance it is recommended to load it into your PHP installation.', - { - docLink: data.phpOpcacheDocumentation, - } - ), + msg: t('core', 'The PHP OPcache module is not loaded. {linkstart}For better performance it is recommended ↗{linkend} to load it into your PHP installation.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_INFO }); } else if(!data.isOpcacheProperlySetup) { messages.push({ - msg: t( - 'core', - 'The PHP OPcache is not properly configured. For better performance it is recommended to use the following settings in the php.ini:', - { - docLink: data.phpOpcacheDocumentation, - } - ) + "
opcache.enable=1\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.memory_consumption=128\nopcache.save_comments=1\nopcache.revalidate_freq=1
", + msg: t('core', 'The PHP OPcache is not properly configured. {linkstart}For better performance it is recommended ↗{linkend} to use the following settings in the php.ini:') + .replace('{linkstart}', '') + .replace('{linkend}', '') + "
opcache.enable=1\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.memory_consumption=128\nopcache.save_comments=1\nopcache.revalidate_freq=1
", type: OC.SetupChecks.MESSAGE_TYPE_INFO }); } @@ -424,13 +427,9 @@ listOfPendingBigIntConversionColumns += "
  • " + element + "
  • "; }); messages.push({ - msg: t( - 'core', - 'Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running \'occ db:convert-filecache-bigint\' those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read the documentation page about this.', - { - docLink: OC.theme.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-bigint-conversion'), - } - ) + "
      " + listOfPendingBigIntConversionColumns + "
    ", + msg: t('core', 'Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running \'occ db:convert-filecache-bigint\' those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read {linkstart}the documentation page about this ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', '') + "
      " + listOfPendingBigIntConversionColumns + "
    ", type: OC.SetupChecks.MESSAGE_TYPE_INFO }) } @@ -440,13 +439,9 @@ 'core', 'SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend.' ) + ' ' + t('core', 'This is particularly recommended when using the desktop client for file synchronisation.') + ' ' + - t( - 'core', - 'To migrate to another database use the command line tool: \'occ db:convert-type\', or see the documentation ↗.', - { - docLink: data.databaseConversionDocumentation, - } - ), + t('core', 'To migrate to another database use the command line tool: \'occ db:convert-type\', or see the {linkstart}documentation ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }) } @@ -477,13 +472,9 @@ } if (data.isMysqlUsedWithoutUTF8MB4) { messages.push({ - msg: t( - 'core', - 'MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read the documentation page about this.', - { - docLink: OC.theme.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-mysql-utf8mb4'), - } - ), + msg: t('core', 'MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read {linkstart}the documentation page about this ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }) } @@ -498,13 +489,9 @@ } if (window.location.protocol === 'http:' && data.reverseProxyGeneratedURL.split('/')[0] !== 'https:') { messages.push({ - msg: t( - 'core', - 'You are accessing your instance over a secure connection, however your instance is generating insecure URLs. This most likely means that you are behind a reverse proxy and the overwrite config variables are not set correctly. Please read the documentation page about this.', - { - docLink: data.reverseProxyDocs - } - ), + msg: t('core', 'You are accessing your instance over a secure connection, however your instance is generating insecure URLs. This most likely means that you are behind a reverse proxy and the overwrite config variables are not set correctly. Please read {linkstart}the documentation page about this ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }) } @@ -544,7 +531,9 @@ var message = setupCheck.description; if (setupCheck.linkToDocumentation) { - message += ' ' + t('core', 'For more details see the documentation.', {docLink: setupCheck.linkToDocumentation}); + message += ' ' + t('core', 'For more details see the {linkstart}documentation ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''); } if (setupCheck.elements) { message += '
      ' @@ -662,16 +651,17 @@ const referrerPolicy = xhr.getResponseHeader('Referrer-Policy') if (referrerPolicy === null || !/(no-referrer(-when-downgrade)?|strict-origin(-when-cross-origin)?|same-origin)(,|$)/.test(referrerPolicy)) { messages.push({ - msg: t('core', 'The "{header}" HTTP header is not set to "{val1}", "{val2}", "{val3}", "{val4}" or "{val5}". This can leak referer information. See the W3C Recommendation ↗.', + msg: t('core', 'The "{header}" HTTP header is not set to "{val1}", "{val2}", "{val3}", "{val4}" or "{val5}". This can leak referer information. See the {linkstart}W3C Recommendation ↗{linkend}.', { header: 'Referrer-Policy', val1: 'no-referrer', val2: 'no-referrer-when-downgrade', val3: 'strict-origin', val4: 'strict-origin-when-cross-origin', - val5: 'same-origin', - link: 'https://www.w3.org/TR/referrer-policy/' - }), + val5: 'same-origin' + }) + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_INFO }) } @@ -711,13 +701,17 @@ var minimumSeconds = 15552000; if(isNaN(transportSecurityValidity) || transportSecurityValidity <= (minimumSeconds - 1)) { messages.push({ - msg: t('core', 'The "Strict-Transport-Security" HTTP header is not set to at least "{seconds}" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips ↗.', {'seconds': minimumSeconds, docUrl: tipsUrl}), + msg: t('core', 'The "Strict-Transport-Security" HTTP header is not set to at least "{seconds}" seconds. For enhanced security, it is recommended to enable HSTS as described in the {linkstart}security tips ↗{linkend}.', {'seconds': minimumSeconds}) + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } } else { messages.push({ - msg: t('core', 'Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead, as described in the security tips ↗.', {docUrl: tipsUrl}), + msg: t('core', 'Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead, as described in the {linkstart}security tips ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js index 43b41a18f1..c4b53ba0bd 100644 --- a/core/js/tests/specs/setupchecksSpec.js +++ b/core/js/tests/specs/setupchecksSpec.js @@ -68,7 +68,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the documentation.', + msg: 'Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the documentation ↗.', type: OC.SetupChecks.MESSAGE_TYPE_INFO }]); done(); @@ -115,7 +115,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'Your web server is not properly set up to resolve "/ocm-provider/". This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in ".htaccess" for Apache or the provided one in the documentation for Nginx at it\'s documentation page. On Nginx those are typically the lines starting with "location ~" that need an update.', + msg: 'Your web server is not properly set up to resolve "/ocm-provider/". This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in ".htaccess" for Apache or the provided one in the documentation for Nginx at it\'s documentation page ↗. On Nginx those are typically the lines starting with "location ~" that need an update.', type: OC.SetupChecks.MESSAGE_TYPE_WARNING }]); done(); @@ -151,7 +151,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'Your web server is not properly set up to deliver .woff2 files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustement to also deliver .woff2 files. Compare your Nginx configuration to the recommended configuration in our documentation.', + msg: 'Your web server is not properly set up to deliver .woff2 files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustement to also deliver .woff2 files. Compare your Nginx configuration to the recommended configuration in our documentation ↗.', type: OC.SetupChecks.MESSAGE_TYPE_WARNING }]); done(); @@ -263,7 +263,7 @@ describe('OC.SetupChecks tests', function() { msg: 'This server has no working Internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. Establish a connection from this server to the Internet to enjoy all features.', type: OC.SetupChecks.MESSAGE_TYPE_WARNING }, { - msg: 'No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the documentation.', + msg: 'No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the documentation ↗.', type: OC.SetupChecks.MESSAGE_TYPE_INFO }]); done(); @@ -320,7 +320,7 @@ describe('OC.SetupChecks tests', function() { type: OC.SetupChecks.MESSAGE_TYPE_WARNING }, { - msg: 'No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the documentation.', + msg: 'No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the documentation ↗.', type: OC.SetupChecks.MESSAGE_TYPE_INFO }]); done(); @@ -427,7 +427,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'No suitable source for randomness found by PHP which is highly discouraged for security reasons. Further information can be found in the documentation.', + msg: 'No suitable source for randomness found by PHP which is highly discouraged for security reasons. Further information can be found in the documentation ↗.', type: OC.SetupChecks.MESSAGE_TYPE_ERROR }]); done(); @@ -480,7 +480,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'Memcached is configured as distributed cache, but the wrong PHP module "memcache" is installed. \\OC\\Memcache\\Memcached only supports "memcached" and not "memcache". See the memcached wiki about both modules.', + msg: 'Memcached is configured as distributed cache, but the wrong PHP module "memcache" is installed. \\OC\\Memcache\\Memcached only supports "memcached" and not "memcache". See the memcached wiki about both modules ↗.', type: OC.SetupChecks.MESSAGE_TYPE_WARNING }]); done(); @@ -588,7 +588,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation.', + msg: 'The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation ↗.', type: OC.SetupChecks.MESSAGE_TYPE_WARNING }]); done(); @@ -768,7 +768,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'You are currently running PHP 5.4.0. Upgrade your PHP version to take advantage of performance and security updates provided by the PHP Group as soon as your distribution supports it.', + msg: 'You are currently running PHP 5.4.0. Upgrade your PHP version to take advantage of performance and security updates provided by the PHP Group ↗ as soon as your distribution supports it.', type: OC.SetupChecks.MESSAGE_TYPE_INFO }]); done(); @@ -822,7 +822,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'The PHP OPcache is not properly configured. For better performance it is recommended to use the following settings in the php.ini:' + "
      opcache.enable=1\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.memory_consumption=128\nopcache.save_comments=1\nopcache.revalidate_freq=1
      ", + msg: 'The PHP OPcache is not properly configured. For better performance it is recommended ↗ to use the following settings in the php.ini:' + "
      opcache.enable=1\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.memory_consumption=128\nopcache.save_comments=1\nopcache.revalidate_freq=1
      ", type: OC.SetupChecks.MESSAGE_TYPE_INFO }]); done(); @@ -876,7 +876,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'The PHP OPcache module is not loaded. For better performance it is recommended to load it into your PHP installation.', + msg: 'The PHP OPcache module is not loaded. For better performance it is recommended ↗ to load it into your PHP installation.', type: OC.SetupChecks.MESSAGE_TYPE_INFO }]); done(); @@ -983,7 +983,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read the documentation page about this.', + msg: 'MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read the documentation page about this ↗.', type: OC.SetupChecks.MESSAGE_TYPE_WARNING }]); done(); @@ -1037,7 +1037,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'You are accessing your instance over a secure connection, however your instance is generating insecure URLs. This most likely means that you are behind a reverse proxy and the overwrite config variables are not set correctly. Please read the documentation page about this.', + msg: 'You are accessing your instance over a secure connection, however your instance is generating insecure URLs. This most likely means that you are behind a reverse proxy and the overwrite config variables are not set correctly. Please read the documentation page about this ↗.', type: OC.SetupChecks.MESSAGE_TYPE_WARNING }]); done(); @@ -1209,7 +1209,7 @@ describe('OC.SetupChecks tests', function() { msg: 'The "X-XSS-Protection" HTTP header doesn\'t contain "1; mode=block". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.', type: OC.SetupChecks.MESSAGE_TYPE_WARNING }, { - msg: 'The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin", "strict-origin-when-cross-origin" or "same-origin". This can leak referer information. See the W3C Recommendation ↗.', + msg: 'The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin", "strict-origin-when-cross-origin" or "same-origin". This can leak referer information. See the W3C Recommendation ↗.', type: OC.SetupChecks.MESSAGE_TYPE_INFO } ]); @@ -1491,7 +1491,7 @@ describe('OC.SetupChecks tests', function() { result.done(function( data, s, x ){ expect(data).toEqual([ { - msg: 'The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin", "strict-origin-when-cross-origin" or "same-origin". This can leak referer information. See the W3C Recommendation ↗.', + msg: 'The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin", "strict-origin-when-cross-origin" or "same-origin". This can leak referer information. See the W3C Recommendation ↗.', type: OC.SetupChecks.MESSAGE_TYPE_INFO } ]); @@ -1517,7 +1517,7 @@ describe('OC.SetupChecks tests', function() { result.done(function( data, s, x ){ expect(data).toEqual([ { - msg: 'The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin", "strict-origin-when-cross-origin" or "same-origin". This can leak referer information. See the W3C Recommendation ↗.', + msg: 'The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin", "strict-origin-when-cross-origin" or "same-origin". This can leak referer information. See the W3C Recommendation ↗.', type: OC.SetupChecks.MESSAGE_TYPE_INFO } ]); @@ -1543,7 +1543,7 @@ describe('OC.SetupChecks tests', function() { result.done(function( data, s, x ){ expect(data).toEqual([ { - msg: 'The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin", "strict-origin-when-cross-origin" or "same-origin". This can leak referer information. See the W3C Recommendation ↗.', + msg: 'The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin", "strict-origin-when-cross-origin" or "same-origin". This can leak referer information. See the W3C Recommendation ↗.', type: OC.SetupChecks.MESSAGE_TYPE_INFO } ]); @@ -1571,7 +1571,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead, as described in the security tips ↗.', + msg: 'Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead, as described in the security tips ↗.', type: OC.SetupChecks.MESSAGE_TYPE_WARNING }]); done(); @@ -1618,7 +1618,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips ↗.', + msg: 'The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips ↗.', type: OC.SetupChecks.MESSAGE_TYPE_WARNING }]); done(); @@ -1644,7 +1644,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips ↗.', + msg: 'The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips ↗.', type: OC.SetupChecks.MESSAGE_TYPE_WARNING }]); done(); @@ -1670,7 +1670,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips ↗.', + msg: 'The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips ↗.', type: OC.SetupChecks.MESSAGE_TYPE_WARNING }]); done(); From db3b698fc06e105decf2bf504d127ab0a1a6f7e4 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 1 Mar 2021 20:28:12 +0100 Subject: [PATCH 3/3] Hello 2016 Signed-off-by: Joas Schilling --- core/js/tests/specs/setupchecksSpec.js | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js index c4b53ba0bd..18a40b4fdd 100644 --- a/core/js/tests/specs/setupchecksSpec.js +++ b/core/js/tests/specs/setupchecksSpec.js @@ -397,7 +397,7 @@ describe('OC.SetupChecks tests', function() { hasValidTransactionIsolationLevel: true, suggestedOverwriteCliURL: '', isRandomnessSecure: false, - securityDocs: 'https://docs.owncloud.org/myDocs.html', + securityDocs: 'https://docs.nextcloud.com/myDocs.html', serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: true, @@ -427,7 +427,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'No suitable source for randomness found by PHP which is highly discouraged for security reasons. Further information can be found in the documentation ↗.', + msg: 'No suitable source for randomness found by PHP which is highly discouraged for security reasons. Further information can be found in the documentation ↗.', type: OC.SetupChecks.MESSAGE_TYPE_ERROR }]); done(); @@ -450,7 +450,7 @@ describe('OC.SetupChecks tests', function() { hasValidTransactionIsolationLevel: true, suggestedOverwriteCliURL: '', isRandomnessSecure: true, - securityDocs: 'https://docs.owncloud.org/myDocs.html', + securityDocs: 'https://docs.nextcloud.com/myDocs.html', serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: true, @@ -503,7 +503,7 @@ describe('OC.SetupChecks tests', function() { hasValidTransactionIsolationLevel: true, suggestedOverwriteCliURL: '', isRandomnessSecure: true, - securityDocs: 'https://docs.owncloud.org/myDocs.html', + securityDocs: 'https://docs.nextcloud.com/myDocs.html', serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: true, @@ -561,7 +561,7 @@ describe('OC.SetupChecks tests', function() { serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: false, - reverseProxyDocs: 'https://docs.owncloud.org/foo/bar.html', + reverseProxyDocs: 'https://docs.nextcloud.com/foo/bar.html', isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, isOpcacheProperlySetup: true, @@ -588,7 +588,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation ↗.', + msg: 'The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation ↗.', type: OC.SetupChecks.MESSAGE_TYPE_WARNING }]); done(); @@ -614,7 +614,7 @@ describe('OC.SetupChecks tests', function() { serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: true, - reverseProxyDocs: 'https://docs.owncloud.org/foo/bar.html', + reverseProxyDocs: 'https://docs.nextcloud.com/foo/bar.html', isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, isOpcacheProperlySetup: true, @@ -667,7 +667,7 @@ describe('OC.SetupChecks tests', function() { serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: true, - reverseProxyDocs: 'https://docs.owncloud.org/foo/bar.html', + reverseProxyDocs: 'https://docs.nextcloud.com/foo/bar.html', isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, isOpcacheProperlySetup: true, @@ -737,7 +737,7 @@ describe('OC.SetupChecks tests', function() { hasValidTransactionIsolationLevel: true, suggestedOverwriteCliURL: '', isRandomnessSecure: true, - securityDocs: 'https://docs.owncloud.org/myDocs.html', + securityDocs: 'https://docs.nextcloud.com/myDocs.html', serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: true, @@ -791,7 +791,7 @@ describe('OC.SetupChecks tests', function() { hasValidTransactionIsolationLevel: true, suggestedOverwriteCliURL: '', isRandomnessSecure: true, - securityDocs: 'https://docs.owncloud.org/myDocs.html', + securityDocs: 'https://docs.nextcloud.com/myDocs.html', serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: true, @@ -845,7 +845,7 @@ describe('OC.SetupChecks tests', function() { hasValidTransactionIsolationLevel: true, suggestedOverwriteCliURL: '', isRandomnessSecure: true, - securityDocs: 'https://docs.owncloud.org/myDocs.html', + securityDocs: 'https://docs.nextcloud.com/myDocs.html', serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: true, @@ -899,7 +899,7 @@ describe('OC.SetupChecks tests', function() { hasValidTransactionIsolationLevel: true, suggestedOverwriteCliURL: '', isRandomnessSecure: true, - securityDocs: 'https://docs.owncloud.org/myDocs.html', + securityDocs: 'https://docs.nextcloud.com/myDocs.html', serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: true, @@ -953,7 +953,7 @@ describe('OC.SetupChecks tests', function() { hasValidTransactionIsolationLevel: true, suggestedOverwriteCliURL: '', isRandomnessSecure: true, - securityDocs: 'https://docs.owncloud.org/myDocs.html', + securityDocs: 'https://docs.nextcloud.com/myDocs.html', serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: true, @@ -1006,7 +1006,7 @@ describe('OC.SetupChecks tests', function() { hasValidTransactionIsolationLevel: true, suggestedOverwriteCliURL: '', isRandomnessSecure: true, - securityDocs: 'https://docs.owncloud.org/myDocs.html', + securityDocs: 'https://docs.nextcloud.com/myDocs.html', serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: true, @@ -1060,7 +1060,7 @@ describe('OC.SetupChecks tests', function() { hasValidTransactionIsolationLevel: true, suggestedOverwriteCliURL: '', isRandomnessSecure: true, - securityDocs: 'https://docs.owncloud.org/myDocs.html', + securityDocs: 'https://docs.nextcloud.com/myDocs.html', serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: true, @@ -1113,7 +1113,7 @@ describe('OC.SetupChecks tests', function() { hasValidTransactionIsolationLevel: true, suggestedOverwriteCliURL: '', isRandomnessSecure: true, - securityDocs: 'https://docs.owncloud.org/myDocs.html', + securityDocs: 'https://docs.nextcloud.com/myDocs.html', serverHasInternetConnectionProblems: false, isMemcacheConfigured: true, forwardedForHeadersWorking: true,