You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

setupchecks.js 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. /*
  2. * Copyright (c) 2014
  3. *
  4. * This file is licensed under the Affero General Public License version 3
  5. * or later.
  6. *
  7. * See the COPYING-README file.
  8. *
  9. */
  10. (function() {
  11. OC.SetupChecks = {
  12. /* Message types */
  13. MESSAGE_TYPE_INFO:0,
  14. MESSAGE_TYPE_WARNING:1,
  15. MESSAGE_TYPE_ERROR:2,
  16. /**
  17. * Check whether the WebDAV connection works.
  18. *
  19. * @return $.Deferred object resolved with an array of error messages
  20. */
  21. checkWebDAV: function() {
  22. var deferred = $.Deferred();
  23. var afterCall = function(xhr) {
  24. var messages = [];
  25. if (xhr.status !== 207 && xhr.status !== 401) {
  26. messages.push({
  27. msg: t('core', 'Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken.'),
  28. type: OC.SetupChecks.MESSAGE_TYPE_ERROR
  29. });
  30. }
  31. deferred.resolve(messages);
  32. };
  33. $.ajax({
  34. type: 'PROPFIND',
  35. url: OC.linkToRemoteBase('webdav'),
  36. data: '<?xml version="1.0"?>' +
  37. '<d:propfind xmlns:d="DAV:">' +
  38. '<d:prop><d:resourcetype/></d:prop>' +
  39. '</d:propfind>',
  40. complete: afterCall,
  41. allowAuthErrors: true
  42. });
  43. return deferred.promise();
  44. },
  45. /**
  46. * Check whether the .well-known URLs works.
  47. *
  48. * @param url the URL to test
  49. * @param placeholderUrl the placeholder URL - can be found at oc_defaults.docPlaceholderUrl
  50. * @param {boolean} runCheck if this is set to false the check is skipped and no error is returned
  51. * @return $.Deferred object resolved with an array of error messages
  52. */
  53. checkWellKnownUrl: function(url, placeholderUrl, runCheck) {
  54. var deferred = $.Deferred();
  55. if(runCheck === false) {
  56. deferred.resolve([]);
  57. return deferred.promise();
  58. }
  59. var afterCall = function(xhr) {
  60. var messages = [];
  61. if (xhr.status !== 207) {
  62. var docUrl = placeholderUrl.replace('PLACEHOLDER', 'admin-setup-well-known-URL');
  63. messages.push({
  64. msg: t('core', 'Your web server is not properly set up to resolve "{url}". Further information can be found in the <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', { docLink: docUrl, url: url }),
  65. type: OC.SetupChecks.MESSAGE_TYPE_INFO
  66. });
  67. }
  68. deferred.resolve(messages);
  69. };
  70. $.ajax({
  71. type: 'PROPFIND',
  72. url: url,
  73. complete: afterCall,
  74. allowAuthErrors: true
  75. });
  76. return deferred.promise();
  77. },
  78. /**
  79. * Runs setup checks on the server side
  80. *
  81. * @return $.Deferred object resolved with an array of error messages
  82. */
  83. checkSetup: function() {
  84. var deferred = $.Deferred();
  85. var afterCall = function(data, statusText, xhr) {
  86. var messages = [];
  87. if (xhr.status === 200 && data) {
  88. if (!data.isGetenvServerWorking) {
  89. messages.push({
  90. 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.') + ' ' +
  91. t(
  92. 'core',
  93. 'Please check the <a target="_blank" rel="noreferrer noopener" href="{docLink}">installation documentation ↗</a> for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm.',
  94. {
  95. docLink: oc_defaults.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-php-fpm')
  96. }
  97. ),
  98. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  99. });
  100. }
  101. if (data.isReadOnlyConfig) {
  102. messages.push({
  103. msg: t('core', 'The read-only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update.'),
  104. type: OC.SetupChecks.MESSAGE_TYPE_INFO
  105. });
  106. }
  107. if (!data.hasValidTransactionIsolationLevel) {
  108. messages.push({
  109. msg: t('core', 'Your database does not run with "READ COMMITTED" transaction isolation level. This can cause problems when multiple actions are executed in parallel.'),
  110. type: OC.SetupChecks.MESSAGE_TYPE_ERROR
  111. });
  112. }
  113. if(!data.hasFileinfoInstalled) {
  114. messages.push({
  115. msg: t('core', 'The PHP module "fileinfo" is missing. It is strongly recommended to enable this module to get the best results with MIME type detection.'),
  116. type: OC.SetupChecks.MESSAGE_TYPE_INFO
  117. });
  118. }
  119. if (data.outdatedCaches.length > 0) {
  120. data.outdatedCaches.forEach(function(element){
  121. messages.push({
  122. msg: t(
  123. 'core',
  124. '{name} below version {version} is installed, for stability and performance reasons it is recommended to update to a newer {name} version.',
  125. element
  126. ),
  127. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  128. })
  129. });
  130. }
  131. if(!data.hasWorkingFileLocking) {
  132. messages.push({
  133. 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 <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation ↗</a> for more information.', {docLink: oc_defaults.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-transactional-locking')}),
  134. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  135. });
  136. }
  137. if (data.suggestedOverwriteCliURL !== '') {
  138. messages.push({
  139. msg: t('core', 'If your installation is not installed at the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the "overwrite.cli.url" option in your config.php file to the webroot path of your installation (suggestion: "{suggestedOverwriteCliURL}")', {suggestedOverwriteCliURL: data.suggestedOverwriteCliURL}),
  140. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  141. });
  142. }
  143. if (data.cronErrors.length > 0) {
  144. var listOfCronErrors = "";
  145. data.cronErrors.forEach(function(element){
  146. listOfCronErrors += "<li>";
  147. listOfCronErrors += element.error;
  148. listOfCronErrors += ' ';
  149. listOfCronErrors += element.hint;
  150. listOfCronErrors += "</li>";
  151. });
  152. messages.push({
  153. msg: t(
  154. 'core',
  155. 'It was not possible to execute the cron job via CLI. The following technical errors have appeared:'
  156. ) + "<ul>" + listOfCronErrors + "</ul>",
  157. type: OC.SetupChecks.MESSAGE_TYPE_ERROR
  158. })
  159. }
  160. if (data.cronInfo.diffInSeconds > 3600) {
  161. messages.push({
  162. msg: t('core', 'Last background job execution ran {relativeTime}. Something seems wrong.', {relativeTime: data.cronInfo.relativeTime}) +
  163. ' <a href="' + data.cronInfo.backgroundJobsUrl + '">' + t('core', 'Check the background job settings') + '</a>',
  164. type: OC.SetupChecks.MESSAGE_TYPE_ERROR
  165. });
  166. }
  167. if (!data.serverHasInternetConnection) {
  168. messages.push({
  169. msg: t('core', '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.'),
  170. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  171. });
  172. }
  173. if(!data.isMemcacheConfigured) {
  174. messages.push({
  175. 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 <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', {docLink: data.memcacheDocs}),
  176. type: OC.SetupChecks.MESSAGE_TYPE_INFO
  177. });
  178. }
  179. if(!data.isUrandomAvailable) {
  180. messages.push({
  181. msg: t('core', '/dev/urandom is not readable by PHP which is highly discouraged for security reasons. Further information can be found in the <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', {docLink: data.securityDocs}),
  182. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  183. });
  184. }
  185. if(data.isUsedTlsLibOutdated) {
  186. messages.push({
  187. msg: data.isUsedTlsLibOutdated,
  188. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  189. });
  190. }
  191. if(data.phpSupported && data.phpSupported.eol) {
  192. messages.push({
  193. msg: t('core', 'You are currently running PHP {version}. Upgrade your PHP version to take advantage of <a target="_blank" rel="noreferrer noopener" href="{phpLink}">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it.', {version: data.phpSupported.version, phpLink: 'https://secure.php.net/supported-versions.php'}),
  194. type: OC.SetupChecks.MESSAGE_TYPE_INFO
  195. });
  196. }
  197. if(data.phpSupported && data.phpSupported.version.substr(0, 3) === '5.6') {
  198. messages.push({
  199. msg: t('core', 'You are currently running PHP 5.6. The current major version of Nextcloud is the last that is supported on PHP 5.6. It is recommended to upgrade the PHP version to 7.0+ to be able to upgrade to Nextcloud 14.'),
  200. type: OC.SetupChecks.MESSAGE_TYPE_INFO
  201. });
  202. }
  203. if(!data.forwardedForHeadersWorking) {
  204. messages.push({
  205. 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 <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', {docLink: data.reverseProxyDocs}),
  206. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  207. });
  208. }
  209. if(!data.isCorrectMemcachedPHPModuleInstalled) {
  210. messages.push({
  211. 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 <a target="_blank" rel="noreferrer noopener" href="{wikiLink}">memcached wiki about both modules</a>.', {wikiLink: 'https://code.google.com/p/memcached/wiki/PHPClientComparison'}),
  212. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  213. });
  214. }
  215. if(!data.hasPassedCodeIntegrityCheck) {
  216. messages.push({
  217. msg: t(
  218. 'core',
  219. 'Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>. (<a href="{codeIntegrityDownloadEndpoint}">List of invalid files…</a> / <a href="{rescanEndpoint}">Rescan…</a>)',
  220. {
  221. docLink: data.codeIntegrityCheckerDocumentation,
  222. codeIntegrityDownloadEndpoint: OC.generateUrl('/settings/integrity/failed'),
  223. rescanEndpoint: OC.generateUrl('/settings/integrity/rescan?requesttoken={requesttoken}', {'requesttoken': OC.requestToken})
  224. }
  225. ),
  226. type: OC.SetupChecks.MESSAGE_TYPE_ERROR
  227. });
  228. }
  229. if(!data.hasOpcacheLoaded) {
  230. messages.push({
  231. msg: t(
  232. 'core',
  233. 'The PHP OPcache module is not loaded. <a target="_blank" rel="noreferrer noopener" href="{docLink}">For better performance it is recommended</a> to load it into your PHP installation.',
  234. {
  235. docLink: data.phpOpcacheDocumentation,
  236. }
  237. ),
  238. type: OC.SetupChecks.MESSAGE_TYPE_INFO
  239. });
  240. } else if(!data.isOpcacheProperlySetup) {
  241. messages.push({
  242. msg: t(
  243. 'core',
  244. 'The PHP OPcache is not properly configured. <a target="_blank" rel="noreferrer noopener" href="{docLink}">For better performance it is recommended</a> to use the following settings in the <code>php.ini</code>:',
  245. {
  246. docLink: data.phpOpcacheDocumentation,
  247. }
  248. ) + "<pre><code>opcache.enable=1\nopcache.enable_cli=1\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.memory_consumption=128\nopcache.save_comments=1\nopcache.revalidate_freq=1</code></pre>",
  249. type: OC.SetupChecks.MESSAGE_TYPE_INFO
  250. });
  251. }
  252. if(!data.isSettimelimitAvailable) {
  253. messages.push({
  254. msg: t(
  255. 'core',
  256. 'The PHP function "set_time_limit" is not available. This could result in scripts being halted mid-execution, breaking your installation. Enabling this function is strongly recommended.'),
  257. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  258. });
  259. }
  260. if (!data.hasFreeTypeSupport) {
  261. messages.push({
  262. msg: t(
  263. 'core',
  264. 'Your PHP does not have FreeType support, resulting in breakage of profile pictures and the settings interface.'
  265. ),
  266. type: OC.SetupChecks.MESSAGE_TYPE_INFO
  267. })
  268. }
  269. if (data.missingIndexes.length > 0) {
  270. var listOfMissingIndexes = "";
  271. data.missingIndexes.forEach(function(element){
  272. listOfMissingIndexes += "<li>";
  273. listOfMissingIndexes += t('core', 'Missing index "{indexName}" in table "{tableName}".', element);
  274. listOfMissingIndexes += "</li>";
  275. });
  276. messages.push({
  277. msg: t(
  278. 'core',
  279. 'The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.'
  280. ) + "<ul>" + listOfMissingIndexes + "</ul>",
  281. type: OC.SetupChecks.MESSAGE_TYPE_INFO
  282. })
  283. }
  284. if (data.isSqliteUsed) {
  285. messages.push({
  286. msg: t(
  287. 'core',
  288. 'SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend.'
  289. ) + ' ' + t('core', 'This is particularly recommended when using the desktop client for file synchronisation.') + ' ' +
  290. t(
  291. 'core',
  292. 'To migrate to another database use the command line tool: \'occ db:convert-type\', or see the <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation ↗</a>.',
  293. {
  294. docLink: data.databaseConversionDocumentation,
  295. }
  296. ),
  297. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  298. })
  299. }
  300. if (data.isPhpMailerUsed) {
  301. messages.push({
  302. msg: t(
  303. 'core',
  304. 'Use of the the built in php mailer is no longer supported. <a target="_blank" rel="noreferrer noopener" href="{docLink}">Please update your email server settings ↗<a/>.',
  305. {
  306. docLink: data.mailSettingsDocumentation,
  307. }
  308. ),
  309. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  310. });
  311. }
  312. if (!data.isMemoryLimitSufficient) {
  313. messages.push({
  314. msg: t(
  315. 'core',
  316. 'The PHP memory limit is below the recommended value of 512MB.'
  317. ),
  318. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  319. })
  320. }
  321. } else {
  322. messages.push({
  323. msg: t('core', 'Error occurred while checking server setup'),
  324. type: OC.SetupChecks.MESSAGE_TYPE_ERROR
  325. });
  326. }
  327. deferred.resolve(messages);
  328. };
  329. $.ajax({
  330. type: 'GET',
  331. url: OC.generateUrl('settings/ajax/checksetup'),
  332. allowAuthErrors: true
  333. }).then(afterCall, afterCall);
  334. return deferred.promise();
  335. },
  336. /**
  337. * Runs generic checks on the server side, the difference to dedicated
  338. * methods is that we use the same XHR object for all checks to save
  339. * requests.
  340. *
  341. * @return $.Deferred object resolved with an array of error messages
  342. */
  343. checkGeneric: function() {
  344. var self = this;
  345. var deferred = $.Deferred();
  346. var afterCall = function(data, statusText, xhr) {
  347. var messages = [];
  348. messages = messages.concat(self._checkSecurityHeaders(xhr));
  349. messages = messages.concat(self._checkSSL(xhr));
  350. deferred.resolve(messages);
  351. };
  352. $.ajax({
  353. type: 'GET',
  354. url: OC.generateUrl('heartbeat'),
  355. allowAuthErrors: true
  356. }).then(afterCall, afterCall);
  357. return deferred.promise();
  358. },
  359. checkDataProtected: function() {
  360. var deferred = $.Deferred();
  361. if(oc_dataURL === false){
  362. return deferred.resolve([]);
  363. }
  364. var afterCall = function(xhr) {
  365. var messages = [];
  366. // .ocdata is an empty file in the data directory - if this is readable then the data dir is not protected
  367. if (xhr.status === 200 && xhr.responseText === '') {
  368. messages.push({
  369. msg: t('core', 'Your data directory and files are probably accessible from the Internet. The .htaccess file is not working. It is strongly recommended that you configure your web server so that the data directory is no longer accessible, or move the data directory outside the web server document root.'),
  370. type: OC.SetupChecks.MESSAGE_TYPE_ERROR
  371. });
  372. }
  373. deferred.resolve(messages);
  374. };
  375. $.ajax({
  376. type: 'GET',
  377. url: OC.linkTo('', oc_dataURL+'/.ocdata?t=' + (new Date()).getTime()),
  378. complete: afterCall,
  379. allowAuthErrors: true
  380. });
  381. return deferred.promise();
  382. },
  383. /**
  384. * Runs check for some generic security headers on the server side
  385. *
  386. * @param {Object} xhr
  387. * @return {Array} Array with error messages
  388. */
  389. _checkSecurityHeaders: function(xhr) {
  390. var messages = [];
  391. if (xhr.status === 200) {
  392. var securityHeaders = {
  393. 'X-XSS-Protection': ['1; mode=block'],
  394. 'X-Content-Type-Options': ['nosniff'],
  395. 'X-Robots-Tag': ['none'],
  396. 'X-Frame-Options': ['SAMEORIGIN', 'DENY'],
  397. 'X-Download-Options': ['noopen'],
  398. 'X-Permitted-Cross-Domain-Policies': ['none'],
  399. };
  400. for (var header in securityHeaders) {
  401. var option = securityHeaders[header][0];
  402. if(!xhr.getResponseHeader(header) || xhr.getResponseHeader(header).toLowerCase() !== option.toLowerCase()) {
  403. var msg = t('core', 'The "{header}" HTTP header is not set to "{expected}". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.', {header: header, expected: option});
  404. if(xhr.getResponseHeader(header) && securityHeaders[header].length > 1 && xhr.getResponseHeader(header).toLowerCase() === securityHeaders[header][1].toLowerCase()) {
  405. msg = t('core', 'The "{header}" HTTP header is not set to "{expected}". Some features might not work correctly, as it is recommended to adjust this setting accordingly.', {header: header, expected: option});
  406. }
  407. messages.push({
  408. msg: msg,
  409. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  410. });
  411. }
  412. }
  413. if (!xhr.getResponseHeader('Referrer-Policy') ||
  414. (xhr.getResponseHeader('Referrer-Policy').toLowerCase() !== 'no-referrer' &&
  415. xhr.getResponseHeader('Referrer-Policy').toLowerCase() !== 'no-referrer-when-downgrade' &&
  416. xhr.getResponseHeader('Referrer-Policy').toLowerCase() !== 'strict-origin' &&
  417. xhr.getResponseHeader('Referrer-Policy').toLowerCase() !== 'strict-origin-when-cross-origin')) {
  418. messages.push({
  419. msg: t('core', 'The "{header}" HTTP header is not set to "{val1}", "{val2}", "{val3}" or "{val4}". This can leak referer information. See the <a target="_blank" rel="noreferrer noopener" href="{link}">W3C Recommendation ↗</a>.',
  420. {
  421. header: 'Referrer-Policy',
  422. val1: 'no-referrer',
  423. val2: 'no-referrer-when-downgrade',
  424. val3: 'strict-origin',
  425. val4: 'strict-origin-when-cross-origin',
  426. link: 'https://www.w3.org/TR/referrer-policy/'
  427. }),
  428. type: OC.SetupChecks.MESSAGE_TYPE_INFO
  429. });
  430. }
  431. } else {
  432. messages.push({
  433. msg: t('core', 'Error occurred while checking server setup'),
  434. type: OC.SetupChecks.MESSAGE_TYPE_ERROR
  435. });
  436. }
  437. return messages;
  438. },
  439. /**
  440. * Runs check for some SSL configuration issues on the server side
  441. *
  442. * @param {Object} xhr
  443. * @return {Array} Array with error messages
  444. */
  445. _checkSSL: function(xhr) {
  446. var messages = [];
  447. if (xhr.status === 200) {
  448. var tipsUrl = oc_defaults.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-security');
  449. if(OC.getProtocol() === 'https') {
  450. // Extract the value of 'Strict-Transport-Security'
  451. var transportSecurityValidity = xhr.getResponseHeader('Strict-Transport-Security');
  452. if(transportSecurityValidity !== null && transportSecurityValidity.length > 8) {
  453. var firstComma = transportSecurityValidity.indexOf(";");
  454. if(firstComma !== -1) {
  455. transportSecurityValidity = transportSecurityValidity.substring(8, firstComma);
  456. } else {
  457. transportSecurityValidity = transportSecurityValidity.substring(8);
  458. }
  459. }
  460. var minimumSeconds = 15552000;
  461. if(isNaN(transportSecurityValidity) || transportSecurityValidity <= (minimumSeconds - 1)) {
  462. messages.push({
  463. 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 <a href="{docUrl}" rel="noreferrer noopener">security tips ↗</a>.', {'seconds': minimumSeconds, docUrl: tipsUrl}),
  464. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  465. });
  466. }
  467. } else {
  468. messages.push({
  469. msg: t('core', 'Accessing site insecurely via HTTP. You are strongly adviced to set up your server to require HTTPS instead, as described in the <a href="{docUrl}">security tips ↗</a>.', {docUrl: tipsUrl}),
  470. type: OC.SetupChecks.MESSAGE_TYPE_WARNING
  471. });
  472. }
  473. } else {
  474. messages.push({
  475. msg: t('core', 'Error occurred while checking server setup'),
  476. type: OC.SetupChecks.MESSAGE_TYPE_ERROR
  477. });
  478. }
  479. return messages;
  480. }
  481. };
  482. })();