Passed
Push — master ( 36835b...e493e7 )
by John
13:58 queued 13s
created
apps/settings/lib/Controller/CheckSetupController.php 1 patch
Indentation   +821 added lines, -821 removed lines patch added patch discarded remove patch
@@ -89,340 +89,340 @@  discard block
 block discarded – undo
89 89
 use Symfony\Component\EventDispatcher\GenericEvent;
90 90
 
91 91
 class CheckSetupController extends Controller {
92
-	/** @var IConfig */
93
-	private $config;
94
-	/** @var IClientService */
95
-	private $clientService;
96
-	/** @var IURLGenerator */
97
-	private $urlGenerator;
98
-	/** @var IL10N */
99
-	private $l10n;
100
-	/** @var Checker */
101
-	private $checker;
102
-	/** @var LoggerInterface */
103
-	private $logger;
104
-	/** @var EventDispatcherInterface */
105
-	private $dispatcher;
106
-	/** @var Connection */
107
-	private $db;
108
-	/** @var ILockingProvider */
109
-	private $lockingProvider;
110
-	/** @var IDateTimeFormatter */
111
-	private $dateTimeFormatter;
112
-	/** @var MemoryInfo */
113
-	private $memoryInfo;
114
-	/** @var ISecureRandom */
115
-	private $secureRandom;
116
-	/** @var IniGetWrapper */
117
-	private $iniGetWrapper;
118
-	/** @var IDBConnection */
119
-	private $connection;
120
-	/** @var ITempManager */
121
-	private $tempManager;
122
-	/** @var IManager */
123
-	private $manager;
124
-	/** @var IAppManager */
125
-	private $appManager;
126
-	/** @var IServerContainer */
127
-	private $serverContainer;
128
-
129
-	public function __construct($AppName,
130
-								IRequest $request,
131
-								IConfig $config,
132
-								IClientService $clientService,
133
-								IURLGenerator $urlGenerator,
134
-								IL10N $l10n,
135
-								Checker $checker,
136
-								LoggerInterface $logger,
137
-								EventDispatcherInterface $dispatcher,
138
-								Connection $db,
139
-								ILockingProvider $lockingProvider,
140
-								IDateTimeFormatter $dateTimeFormatter,
141
-								MemoryInfo $memoryInfo,
142
-								ISecureRandom $secureRandom,
143
-								IniGetWrapper $iniGetWrapper,
144
-								IDBConnection $connection,
145
-								ITempManager $tempManager,
146
-								IManager $manager,
147
-								IAppManager $appManager,
148
-								IServerContainer $serverContainer
149
-	) {
150
-		parent::__construct($AppName, $request);
151
-		$this->config = $config;
152
-		$this->clientService = $clientService;
153
-		$this->urlGenerator = $urlGenerator;
154
-		$this->l10n = $l10n;
155
-		$this->checker = $checker;
156
-		$this->logger = $logger;
157
-		$this->dispatcher = $dispatcher;
158
-		$this->db = $db;
159
-		$this->lockingProvider = $lockingProvider;
160
-		$this->dateTimeFormatter = $dateTimeFormatter;
161
-		$this->memoryInfo = $memoryInfo;
162
-		$this->secureRandom = $secureRandom;
163
-		$this->iniGetWrapper = $iniGetWrapper;
164
-		$this->connection = $connection;
165
-		$this->tempManager = $tempManager;
166
-		$this->manager = $manager;
167
-		$this->appManager = $appManager;
168
-		$this->serverContainer = $serverContainer;
169
-	}
170
-
171
-	/**
172
-	 * Check if is fair use of free push service
173
-	 * @return bool
174
-	 */
175
-	private function isFairUseOfFreePushService(): bool {
176
-		return $this->manager->isFairUseOfFreePushService();
177
-	}
178
-
179
-	/**
180
-	 * Checks if the server can connect to the internet using HTTPS and HTTP
181
-	 * @return bool
182
-	 */
183
-	private function hasInternetConnectivityProblems(): bool {
184
-		if ($this->config->getSystemValue('has_internet_connection', true) === false) {
185
-			return false;
186
-		}
187
-
188
-		$siteArray = $this->config->getSystemValue('connectivity_check_domains', [
189
-			'www.nextcloud.com', 'www.startpage.com', 'www.eff.org', 'www.edri.org'
190
-		]);
191
-
192
-		foreach ($siteArray as $site) {
193
-			if ($this->isSiteReachable($site)) {
194
-				return false;
195
-			}
196
-		}
197
-		return true;
198
-	}
199
-
200
-	/**
201
-	 * Checks if the Nextcloud server can connect to a specific URL
202
-	 * @param string $site site domain or full URL with http/https protocol
203
-	 * @return bool
204
-	 */
205
-	private function isSiteReachable(string $site): bool {
206
-		try {
207
-			$client = $this->clientService->newClient();
208
-			// if there is no protocol, test http:// AND https://
209
-			if (preg_match('/^https?:\/\//', $site) !== 1) {
210
-				$httpSite = 'http://' . $site . '/';
211
-				$client->get($httpSite);
212
-				$httpsSite = 'https://' . $site . '/';
213
-				$client->get($httpsSite);
214
-			} else {
215
-				$client->get($site);
216
-			}
217
-		} catch (\Exception $e) {
218
-			$this->logger->error('Cannot connect to: ' . $site, [
219
-				'app' => 'internet_connection_check',
220
-				'exception' => $e,
221
-			]);
222
-			return false;
223
-		}
224
-		return true;
225
-	}
226
-
227
-	/**
228
-	 * Checks whether a local memcache is installed or not
229
-	 * @return bool
230
-	 */
231
-	private function isMemcacheConfigured() {
232
-		return $this->config->getSystemValue('memcache.local', null) !== null;
233
-	}
234
-
235
-	/**
236
-	 * Whether PHP can generate "secure" pseudorandom integers
237
-	 *
238
-	 * @return bool
239
-	 */
240
-	private function isRandomnessSecure() {
241
-		try {
242
-			$this->secureRandom->generate(1);
243
-		} catch (\Exception $ex) {
244
-			return false;
245
-		}
246
-		return true;
247
-	}
248
-
249
-	/**
250
-	 * Public for the sake of unit-testing
251
-	 *
252
-	 * @return array
253
-	 */
254
-	protected function getCurlVersion() {
255
-		return curl_version();
256
-	}
257
-
258
-	/**
259
-	 * Check if the used SSL lib is outdated. Older OpenSSL and NSS versions do
260
-	 * have multiple bugs which likely lead to problems in combination with
261
-	 * functionality required by ownCloud such as SNI.
262
-	 *
263
-	 * @link https://github.com/owncloud/core/issues/17446#issuecomment-122877546
264
-	 * @link https://bugzilla.redhat.com/show_bug.cgi?id=1241172
265
-	 * @return string
266
-	 */
267
-	private function isUsedTlsLibOutdated() {
268
-		// Don't run check when:
269
-		// 1. Server has `has_internet_connection` set to false
270
-		// 2. AppStore AND S2S is disabled
271
-		if (!$this->config->getSystemValue('has_internet_connection', true)) {
272
-			return '';
273
-		}
274
-		if (!$this->config->getSystemValue('appstoreenabled', true)
275
-			&& $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'no'
276
-			&& $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'no') {
277
-			return '';
278
-		}
279
-
280
-		$versionString = $this->getCurlVersion();
281
-		if (isset($versionString['ssl_version'])) {
282
-			$versionString = $versionString['ssl_version'];
283
-		} else {
284
-			return '';
285
-		}
286
-
287
-		$features = $this->l10n->t('installing and updating apps via the App Store or Federated Cloud Sharing');
288
-		if (!$this->config->getSystemValue('appstoreenabled', true)) {
289
-			$features = $this->l10n->t('Federated Cloud Sharing');
290
-		}
291
-
292
-		// Check if at least OpenSSL after 1.01d or 1.0.2b
293
-		if (strpos($versionString, 'OpenSSL/') === 0) {
294
-			$majorVersion = substr($versionString, 8, 5);
295
-			$patchRelease = substr($versionString, 13, 6);
296
-
297
-			if (($majorVersion === '1.0.1' && ord($patchRelease) < ord('d')) ||
298
-				($majorVersion === '1.0.2' && ord($patchRelease) < ord('b'))) {
299
-				return $this->l10n->t('cURL is using an outdated %1$s version (%2$s). Please update your operating system or features such as %3$s will not work reliably.', ['OpenSSL', $versionString, $features]);
300
-			}
301
-		}
302
-
303
-		// Check if NSS and perform heuristic check
304
-		if (strpos($versionString, 'NSS/') === 0) {
305
-			try {
306
-				$firstClient = $this->clientService->newClient();
307
-				$firstClient->get('https://nextcloud.com/');
308
-
309
-				$secondClient = $this->clientService->newClient();
310
-				$secondClient->get('https://nextcloud.com/');
311
-			} catch (ClientException $e) {
312
-				if ($e->getResponse()->getStatusCode() === 400) {
313
-					return $this->l10n->t('cURL is using an outdated %1$s version (%2$s). Please update your operating system or features such as %3$s will not work reliably.', ['NSS', $versionString, $features]);
314
-				}
315
-			} catch (\Exception $e) {
316
-				$this->logger->warning('error checking curl', [
317
-					'app' => 'settings',
318
-					'exception' => $e,
319
-				]);
320
-				return $this->l10n->t('Could not determine if TLS version of cURL is outdated or not because an error happened during the HTTPS request against https://nextcloud.com. Please check the Nextcloud log file for more details.');
321
-			}
322
-		}
323
-
324
-		return '';
325
-	}
326
-
327
-	/**
328
-	 * Whether the version is outdated
329
-	 *
330
-	 * @return bool
331
-	 */
332
-	protected function isPhpOutdated(): bool {
333
-		return PHP_VERSION_ID < 80000;
334
-	}
335
-
336
-	/**
337
-	 * Whether the php version is still supported (at time of release)
338
-	 * according to: https://www.php.net/supported-versions.php
339
-	 *
340
-	 * @return array
341
-	 */
342
-	private function isPhpSupported(): array {
343
-		return ['eol' => $this->isPhpOutdated(), 'version' => PHP_VERSION];
344
-	}
345
-
346
-	/**
347
-	 * Check if the reverse proxy configuration is working as expected
348
-	 *
349
-	 * @return bool
350
-	 */
351
-	private function forwardedForHeadersWorking(): bool {
352
-		$trustedProxies = $this->config->getSystemValue('trusted_proxies', []);
353
-		$remoteAddress = $this->request->getHeader('REMOTE_ADDR');
354
-
355
-		if (empty($trustedProxies) && $this->request->getHeader('X-Forwarded-Host') !== '') {
356
-			return false;
357
-		}
358
-
359
-		if (\is_array($trustedProxies)) {
360
-			if (\in_array($remoteAddress, $trustedProxies, true) && $remoteAddress !== '127.0.0.1') {
361
-				return $remoteAddress !== $this->request->getRemoteAddress();
362
-			}
363
-		} else {
364
-			return false;
365
-		}
366
-
367
-		// either not enabled or working correctly
368
-		return true;
369
-	}
370
-
371
-	/**
372
-	 * Checks if the correct memcache module for PHP is installed. Only
373
-	 * fails if memcached is configured and the working module is not installed.
374
-	 *
375
-	 * @return bool
376
-	 */
377
-	private function isCorrectMemcachedPHPModuleInstalled() {
378
-		if ($this->config->getSystemValue('memcache.distributed', null) !== '\OC\Memcache\Memcached') {
379
-			return true;
380
-		}
381
-
382
-		// there are two different memcache modules for PHP
383
-		// we only support memcached and not memcache
384
-		// https://code.google.com/p/memcached/wiki/PHPClientComparison
385
-		return !(!extension_loaded('memcached') && extension_loaded('memcache'));
386
-	}
387
-
388
-	/**
389
-	 * Checks if set_time_limit is not disabled.
390
-	 *
391
-	 * @return bool
392
-	 */
393
-	private function isSettimelimitAvailable() {
394
-		if (function_exists('set_time_limit')
395
-			&& strpos(ini_get('disable_functions'), 'set_time_limit') === false) {
396
-			return true;
397
-		}
398
-
399
-		return false;
400
-	}
401
-
402
-	/**
403
-	 * @return RedirectResponse
404
-	 * @AuthorizedAdminSetting(settings=OCA\Settings\Settings\Admin\Overview)
405
-	 */
406
-	public function rescanFailedIntegrityCheck(): RedirectResponse {
407
-		$this->checker->runInstanceVerification();
408
-		return new RedirectResponse(
409
-			$this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'overview'])
410
-		);
411
-	}
412
-
413
-	/**
414
-	 * @NoCSRFRequired
415
-	 * @AuthorizedAdminSetting(settings=OCA\Settings\Settings\Admin\Overview)
416
-	 */
417
-	public function getFailedIntegrityCheckFiles(): DataDisplayResponse {
418
-		if (!$this->checker->isCodeCheckEnforced()) {
419
-			return new DataDisplayResponse('Integrity checker has been disabled. Integrity cannot be verified.');
420
-		}
421
-
422
-		$completeResults = $this->checker->getResults();
423
-
424
-		if (!empty($completeResults)) {
425
-			$formattedTextResponse = 'Technical information
92
+    /** @var IConfig */
93
+    private $config;
94
+    /** @var IClientService */
95
+    private $clientService;
96
+    /** @var IURLGenerator */
97
+    private $urlGenerator;
98
+    /** @var IL10N */
99
+    private $l10n;
100
+    /** @var Checker */
101
+    private $checker;
102
+    /** @var LoggerInterface */
103
+    private $logger;
104
+    /** @var EventDispatcherInterface */
105
+    private $dispatcher;
106
+    /** @var Connection */
107
+    private $db;
108
+    /** @var ILockingProvider */
109
+    private $lockingProvider;
110
+    /** @var IDateTimeFormatter */
111
+    private $dateTimeFormatter;
112
+    /** @var MemoryInfo */
113
+    private $memoryInfo;
114
+    /** @var ISecureRandom */
115
+    private $secureRandom;
116
+    /** @var IniGetWrapper */
117
+    private $iniGetWrapper;
118
+    /** @var IDBConnection */
119
+    private $connection;
120
+    /** @var ITempManager */
121
+    private $tempManager;
122
+    /** @var IManager */
123
+    private $manager;
124
+    /** @var IAppManager */
125
+    private $appManager;
126
+    /** @var IServerContainer */
127
+    private $serverContainer;
128
+
129
+    public function __construct($AppName,
130
+                                IRequest $request,
131
+                                IConfig $config,
132
+                                IClientService $clientService,
133
+                                IURLGenerator $urlGenerator,
134
+                                IL10N $l10n,
135
+                                Checker $checker,
136
+                                LoggerInterface $logger,
137
+                                EventDispatcherInterface $dispatcher,
138
+                                Connection $db,
139
+                                ILockingProvider $lockingProvider,
140
+                                IDateTimeFormatter $dateTimeFormatter,
141
+                                MemoryInfo $memoryInfo,
142
+                                ISecureRandom $secureRandom,
143
+                                IniGetWrapper $iniGetWrapper,
144
+                                IDBConnection $connection,
145
+                                ITempManager $tempManager,
146
+                                IManager $manager,
147
+                                IAppManager $appManager,
148
+                                IServerContainer $serverContainer
149
+    ) {
150
+        parent::__construct($AppName, $request);
151
+        $this->config = $config;
152
+        $this->clientService = $clientService;
153
+        $this->urlGenerator = $urlGenerator;
154
+        $this->l10n = $l10n;
155
+        $this->checker = $checker;
156
+        $this->logger = $logger;
157
+        $this->dispatcher = $dispatcher;
158
+        $this->db = $db;
159
+        $this->lockingProvider = $lockingProvider;
160
+        $this->dateTimeFormatter = $dateTimeFormatter;
161
+        $this->memoryInfo = $memoryInfo;
162
+        $this->secureRandom = $secureRandom;
163
+        $this->iniGetWrapper = $iniGetWrapper;
164
+        $this->connection = $connection;
165
+        $this->tempManager = $tempManager;
166
+        $this->manager = $manager;
167
+        $this->appManager = $appManager;
168
+        $this->serverContainer = $serverContainer;
169
+    }
170
+
171
+    /**
172
+     * Check if is fair use of free push service
173
+     * @return bool
174
+     */
175
+    private function isFairUseOfFreePushService(): bool {
176
+        return $this->manager->isFairUseOfFreePushService();
177
+    }
178
+
179
+    /**
180
+     * Checks if the server can connect to the internet using HTTPS and HTTP
181
+     * @return bool
182
+     */
183
+    private function hasInternetConnectivityProblems(): bool {
184
+        if ($this->config->getSystemValue('has_internet_connection', true) === false) {
185
+            return false;
186
+        }
187
+
188
+        $siteArray = $this->config->getSystemValue('connectivity_check_domains', [
189
+            'www.nextcloud.com', 'www.startpage.com', 'www.eff.org', 'www.edri.org'
190
+        ]);
191
+
192
+        foreach ($siteArray as $site) {
193
+            if ($this->isSiteReachable($site)) {
194
+                return false;
195
+            }
196
+        }
197
+        return true;
198
+    }
199
+
200
+    /**
201
+     * Checks if the Nextcloud server can connect to a specific URL
202
+     * @param string $site site domain or full URL with http/https protocol
203
+     * @return bool
204
+     */
205
+    private function isSiteReachable(string $site): bool {
206
+        try {
207
+            $client = $this->clientService->newClient();
208
+            // if there is no protocol, test http:// AND https://
209
+            if (preg_match('/^https?:\/\//', $site) !== 1) {
210
+                $httpSite = 'http://' . $site . '/';
211
+                $client->get($httpSite);
212
+                $httpsSite = 'https://' . $site . '/';
213
+                $client->get($httpsSite);
214
+            } else {
215
+                $client->get($site);
216
+            }
217
+        } catch (\Exception $e) {
218
+            $this->logger->error('Cannot connect to: ' . $site, [
219
+                'app' => 'internet_connection_check',
220
+                'exception' => $e,
221
+            ]);
222
+            return false;
223
+        }
224
+        return true;
225
+    }
226
+
227
+    /**
228
+     * Checks whether a local memcache is installed or not
229
+     * @return bool
230
+     */
231
+    private function isMemcacheConfigured() {
232
+        return $this->config->getSystemValue('memcache.local', null) !== null;
233
+    }
234
+
235
+    /**
236
+     * Whether PHP can generate "secure" pseudorandom integers
237
+     *
238
+     * @return bool
239
+     */
240
+    private function isRandomnessSecure() {
241
+        try {
242
+            $this->secureRandom->generate(1);
243
+        } catch (\Exception $ex) {
244
+            return false;
245
+        }
246
+        return true;
247
+    }
248
+
249
+    /**
250
+     * Public for the sake of unit-testing
251
+     *
252
+     * @return array
253
+     */
254
+    protected function getCurlVersion() {
255
+        return curl_version();
256
+    }
257
+
258
+    /**
259
+     * Check if the used SSL lib is outdated. Older OpenSSL and NSS versions do
260
+     * have multiple bugs which likely lead to problems in combination with
261
+     * functionality required by ownCloud such as SNI.
262
+     *
263
+     * @link https://github.com/owncloud/core/issues/17446#issuecomment-122877546
264
+     * @link https://bugzilla.redhat.com/show_bug.cgi?id=1241172
265
+     * @return string
266
+     */
267
+    private function isUsedTlsLibOutdated() {
268
+        // Don't run check when:
269
+        // 1. Server has `has_internet_connection` set to false
270
+        // 2. AppStore AND S2S is disabled
271
+        if (!$this->config->getSystemValue('has_internet_connection', true)) {
272
+            return '';
273
+        }
274
+        if (!$this->config->getSystemValue('appstoreenabled', true)
275
+            && $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'no'
276
+            && $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'no') {
277
+            return '';
278
+        }
279
+
280
+        $versionString = $this->getCurlVersion();
281
+        if (isset($versionString['ssl_version'])) {
282
+            $versionString = $versionString['ssl_version'];
283
+        } else {
284
+            return '';
285
+        }
286
+
287
+        $features = $this->l10n->t('installing and updating apps via the App Store or Federated Cloud Sharing');
288
+        if (!$this->config->getSystemValue('appstoreenabled', true)) {
289
+            $features = $this->l10n->t('Federated Cloud Sharing');
290
+        }
291
+
292
+        // Check if at least OpenSSL after 1.01d or 1.0.2b
293
+        if (strpos($versionString, 'OpenSSL/') === 0) {
294
+            $majorVersion = substr($versionString, 8, 5);
295
+            $patchRelease = substr($versionString, 13, 6);
296
+
297
+            if (($majorVersion === '1.0.1' && ord($patchRelease) < ord('d')) ||
298
+                ($majorVersion === '1.0.2' && ord($patchRelease) < ord('b'))) {
299
+                return $this->l10n->t('cURL is using an outdated %1$s version (%2$s). Please update your operating system or features such as %3$s will not work reliably.', ['OpenSSL', $versionString, $features]);
300
+            }
301
+        }
302
+
303
+        // Check if NSS and perform heuristic check
304
+        if (strpos($versionString, 'NSS/') === 0) {
305
+            try {
306
+                $firstClient = $this->clientService->newClient();
307
+                $firstClient->get('https://nextcloud.com/');
308
+
309
+                $secondClient = $this->clientService->newClient();
310
+                $secondClient->get('https://nextcloud.com/');
311
+            } catch (ClientException $e) {
312
+                if ($e->getResponse()->getStatusCode() === 400) {
313
+                    return $this->l10n->t('cURL is using an outdated %1$s version (%2$s). Please update your operating system or features such as %3$s will not work reliably.', ['NSS', $versionString, $features]);
314
+                }
315
+            } catch (\Exception $e) {
316
+                $this->logger->warning('error checking curl', [
317
+                    'app' => 'settings',
318
+                    'exception' => $e,
319
+                ]);
320
+                return $this->l10n->t('Could not determine if TLS version of cURL is outdated or not because an error happened during the HTTPS request against https://nextcloud.com. Please check the Nextcloud log file for more details.');
321
+            }
322
+        }
323
+
324
+        return '';
325
+    }
326
+
327
+    /**
328
+     * Whether the version is outdated
329
+     *
330
+     * @return bool
331
+     */
332
+    protected function isPhpOutdated(): bool {
333
+        return PHP_VERSION_ID < 80000;
334
+    }
335
+
336
+    /**
337
+     * Whether the php version is still supported (at time of release)
338
+     * according to: https://www.php.net/supported-versions.php
339
+     *
340
+     * @return array
341
+     */
342
+    private function isPhpSupported(): array {
343
+        return ['eol' => $this->isPhpOutdated(), 'version' => PHP_VERSION];
344
+    }
345
+
346
+    /**
347
+     * Check if the reverse proxy configuration is working as expected
348
+     *
349
+     * @return bool
350
+     */
351
+    private function forwardedForHeadersWorking(): bool {
352
+        $trustedProxies = $this->config->getSystemValue('trusted_proxies', []);
353
+        $remoteAddress = $this->request->getHeader('REMOTE_ADDR');
354
+
355
+        if (empty($trustedProxies) && $this->request->getHeader('X-Forwarded-Host') !== '') {
356
+            return false;
357
+        }
358
+
359
+        if (\is_array($trustedProxies)) {
360
+            if (\in_array($remoteAddress, $trustedProxies, true) && $remoteAddress !== '127.0.0.1') {
361
+                return $remoteAddress !== $this->request->getRemoteAddress();
362
+            }
363
+        } else {
364
+            return false;
365
+        }
366
+
367
+        // either not enabled or working correctly
368
+        return true;
369
+    }
370
+
371
+    /**
372
+     * Checks if the correct memcache module for PHP is installed. Only
373
+     * fails if memcached is configured and the working module is not installed.
374
+     *
375
+     * @return bool
376
+     */
377
+    private function isCorrectMemcachedPHPModuleInstalled() {
378
+        if ($this->config->getSystemValue('memcache.distributed', null) !== '\OC\Memcache\Memcached') {
379
+            return true;
380
+        }
381
+
382
+        // there are two different memcache modules for PHP
383
+        // we only support memcached and not memcache
384
+        // https://code.google.com/p/memcached/wiki/PHPClientComparison
385
+        return !(!extension_loaded('memcached') && extension_loaded('memcache'));
386
+    }
387
+
388
+    /**
389
+     * Checks if set_time_limit is not disabled.
390
+     *
391
+     * @return bool
392
+     */
393
+    private function isSettimelimitAvailable() {
394
+        if (function_exists('set_time_limit')
395
+            && strpos(ini_get('disable_functions'), 'set_time_limit') === false) {
396
+            return true;
397
+        }
398
+
399
+        return false;
400
+    }
401
+
402
+    /**
403
+     * @return RedirectResponse
404
+     * @AuthorizedAdminSetting(settings=OCA\Settings\Settings\Admin\Overview)
405
+     */
406
+    public function rescanFailedIntegrityCheck(): RedirectResponse {
407
+        $this->checker->runInstanceVerification();
408
+        return new RedirectResponse(
409
+            $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'overview'])
410
+        );
411
+    }
412
+
413
+    /**
414
+     * @NoCSRFRequired
415
+     * @AuthorizedAdminSetting(settings=OCA\Settings\Settings\Admin\Overview)
416
+     */
417
+    public function getFailedIntegrityCheckFiles(): DataDisplayResponse {
418
+        if (!$this->checker->isCodeCheckEnforced()) {
419
+            return new DataDisplayResponse('Integrity checker has been disabled. Integrity cannot be verified.');
420
+        }
421
+
422
+        $completeResults = $this->checker->getResults();
423
+
424
+        if (!empty($completeResults)) {
425
+            $formattedTextResponse = 'Technical information
426 426
 =====================
427 427
 The following list covers which files have failed the integrity check. Please read
428 428
 the previous linked documentation to learn more about the errors and how to fix
@@ -431,494 +431,494 @@  discard block
 block discarded – undo
431 431
 Results
432 432
 =======
433 433
 ';
434
-			foreach ($completeResults as $context => $contextResult) {
435
-				$formattedTextResponse .= "- $context\n";
436
-
437
-				foreach ($contextResult as $category => $result) {
438
-					$formattedTextResponse .= "\t- $category\n";
439
-					if ($category !== 'EXCEPTION') {
440
-						foreach ($result as $key => $results) {
441
-							$formattedTextResponse .= "\t\t- $key\n";
442
-						}
443
-					} else {
444
-						foreach ($result as $key => $results) {
445
-							$formattedTextResponse .= "\t\t- $results\n";
446
-						}
447
-					}
448
-				}
449
-			}
450
-
451
-			$formattedTextResponse .= '
434
+            foreach ($completeResults as $context => $contextResult) {
435
+                $formattedTextResponse .= "- $context\n";
436
+
437
+                foreach ($contextResult as $category => $result) {
438
+                    $formattedTextResponse .= "\t- $category\n";
439
+                    if ($category !== 'EXCEPTION') {
440
+                        foreach ($result as $key => $results) {
441
+                            $formattedTextResponse .= "\t\t- $key\n";
442
+                        }
443
+                    } else {
444
+                        foreach ($result as $key => $results) {
445
+                            $formattedTextResponse .= "\t\t- $results\n";
446
+                        }
447
+                    }
448
+                }
449
+            }
450
+
451
+            $formattedTextResponse .= '
452 452
 Raw output
453 453
 ==========
454 454
 ';
455
-			$formattedTextResponse .= print_r($completeResults, true);
456
-		} else {
457
-			$formattedTextResponse = 'No errors have been found.';
458
-		}
459
-
460
-
461
-		return new DataDisplayResponse(
462
-			$formattedTextResponse,
463
-			Http::STATUS_OK,
464
-			[
465
-				'Content-Type' => 'text/plain',
466
-			]
467
-		);
468
-	}
469
-
470
-	/**
471
-	 * Checks whether a PHP OPcache is properly set up
472
-	 * @return string[] The list of OPcache setup recommendations
473
-	 */
474
-	protected function getOpcacheSetupRecommendations(): array {
475
-		// If the module is not loaded, return directly to skip inapplicable checks
476
-		if (!extension_loaded('Zend OPcache')) {
477
-			return [$this->l10n->t('The PHP OPcache module is not loaded. For better performance it is recommended to load it into your PHP installation.')];
478
-		}
479
-
480
-		$recommendations = [];
481
-
482
-		// Check whether Nextcloud is allowed to use the OPcache API
483
-		$isPermitted = true;
484
-		$permittedPath = $this->iniGetWrapper->getString('opcache.restrict_api');
485
-		if (isset($permittedPath) && $permittedPath !== '' && !str_starts_with(\OC::$SERVERROOT, rtrim($permittedPath, '/'))) {
486
-			$isPermitted = false;
487
-		}
488
-
489
-		if (!$this->iniGetWrapper->getBool('opcache.enable')) {
490
-			$recommendations[] = $this->l10n->t('OPcache is disabled. For better performance, it is recommended to apply <code>opcache.enable=1</code> to your PHP configuration.');
491
-
492
-			// Check for saved comments only when OPcache is currently disabled. If it was enabled, opcache.save_comments=0 would break Nextcloud in the first place.
493
-			if (!$this->iniGetWrapper->getBool('opcache.save_comments')) {
494
-				$recommendations[] = $this->l10n->t('OPcache is configured to remove code comments. With OPcache enabled, <code>opcache.save_comments=1</code> must be set for Nextcloud to function.');
495
-			}
496
-
497
-			if (!$isPermitted) {
498
-				$recommendations[] = $this->l10n->t('Nextcloud is not allowed to use the OPcache API. With OPcache enabled, it is highly recommended to include all Nextcloud directories with <code>opcache.restrict_api</code> or unset this setting to disable OPcache API restrictions, to prevent errors during Nextcloud core or app upgrades.');
499
-			}
500
-		} elseif (!$isPermitted) {
501
-			$recommendations[] = $this->l10n->t('Nextcloud is not allowed to use the OPcache API. It is highly recommended to include all Nextcloud directories with <code>opcache.restrict_api</code> or unset this setting to disable OPcache API restrictions, to prevent errors during Nextcloud core or app upgrades.');
502
-		} elseif ($this->iniGetWrapper->getBool('opcache.file_cache_only')) {
503
-			$recommendations[] = $this->l10n->t('The shared memory based OPcache is disabled. For better performance, it is recommended to apply <code>opcache.file_cache_only=0</code> to your PHP configuration and use the file cache as second level cache only.');
504
-		} else {
505
-			// Check whether opcache_get_status has been explicitly disabled an in case skip usage based checks
506
-			$disabledFunctions = $this->iniGetWrapper->getString('disable_functions');
507
-			if (isset($disabledFunctions) && str_contains($disabledFunctions, 'opcache_get_status')) {
508
-				return [];
509
-			}
510
-
511
-			$status = opcache_get_status(false);
512
-
513
-			// Recommend to raise value, if more than 90% of max value is reached
514
-			if (
515
-				empty($status['opcache_statistics']['max_cached_keys']) ||
516
-				($status['opcache_statistics']['num_cached_keys'] / $status['opcache_statistics']['max_cached_keys'] > 0.9)
517
-			) {
518
-				$recommendations[] = $this->l10n->t('The maximum number of OPcache keys is nearly exceeded. To assure that all scripts can be kept in the cache, it is recommended to apply <code>opcache.max_accelerated_files</code> to your PHP configuration with a value higher than <code>%s</code>.', [($this->iniGetWrapper->getNumeric('opcache.max_accelerated_files') ?: 'currently')]);
519
-			}
520
-
521
-			if (
522
-				empty($status['memory_usage']['free_memory']) ||
523
-				($status['memory_usage']['used_memory'] / $status['memory_usage']['free_memory'] > 9)
524
-			) {
525
-				$recommendations[] = $this->l10n->t('The OPcache buffer is nearly full. To assure that all scripts can be hold in cache, it is recommended to apply <code>opcache.memory_consumption</code> to your PHP configuration with a value higher than <code>%s</code>.', [($this->iniGetWrapper->getNumeric('opcache.memory_consumption') ?: 'currently')]);
526
-			}
527
-
528
-			if (
529
-				// Do not recommend to raise the interned strings buffer size above a quarter of the total OPcache size
530
-				($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') < $this->iniGetWrapper->getNumeric('opcache.memory_consumption') / 4) &&
531
-				(
532
-					empty($status['interned_strings_usage']['free_memory']) ||
533
-					($status['interned_strings_usage']['used_memory'] / $status['interned_strings_usage']['free_memory'] > 9)
534
-				)
535
-			) {
536
-				$recommendations[] = $this->l10n->t('The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply <code>opcache.interned_strings_buffer</code> to your PHP configuration with a value higher than <code>%s</code>.', [($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') ?: 'currently')]);
537
-			}
538
-		}
539
-
540
-		return $recommendations;
541
-	}
542
-
543
-	/**
544
-	 * Check if the required FreeType functions are present
545
-	 * @return bool
546
-	 */
547
-	protected function hasFreeTypeSupport() {
548
-		return function_exists('imagettfbbox') && function_exists('imagettftext');
549
-	}
550
-
551
-	protected function hasMissingIndexes(): array {
552
-		$indexInfo = new MissingIndexInformation();
553
-		// Dispatch event so apps can also hint for pending index updates if needed
554
-		$event = new GenericEvent($indexInfo);
555
-		$this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_INDEXES_EVENT, $event);
556
-
557
-		return $indexInfo->getListOfMissingIndexes();
558
-	}
559
-
560
-	protected function hasMissingPrimaryKeys(): array {
561
-		$info = new MissingPrimaryKeyInformation();
562
-		// Dispatch event so apps can also hint for pending index updates if needed
563
-		$event = new GenericEvent($info);
564
-		$this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_PRIMARY_KEYS_EVENT, $event);
565
-
566
-		return $info->getListOfMissingPrimaryKeys();
567
-	}
568
-
569
-	protected function hasMissingColumns(): array {
570
-		$indexInfo = new MissingColumnInformation();
571
-		// Dispatch event so apps can also hint for pending index updates if needed
572
-		$event = new GenericEvent($indexInfo);
573
-		$this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_COLUMNS_EVENT, $event);
574
-
575
-		return $indexInfo->getListOfMissingColumns();
576
-	}
577
-
578
-	protected function isSqliteUsed() {
579
-		return strpos($this->config->getSystemValue('dbtype'), 'sqlite') !== false;
580
-	}
581
-
582
-	protected function isReadOnlyConfig(): bool {
583
-		return \OC_Helper::isReadOnlyConfigEnabled();
584
-	}
585
-
586
-	protected function wasEmailTestSuccessful(): bool {
587
-		// Handle the case that the configuration was set before the check was introduced or it was only set via command line and not from the UI
588
-		if ($this->config->getAppValue('core', 'emailTestSuccessful', '') === '' && $this->config->getSystemValue('mail_domain', '') === '') {
589
-			return false;
590
-		}
591
-
592
-		// The mail test was unsuccessful or the config was changed using the UI without verifying with a testmail, hence return false
593
-		if ($this->config->getAppValue('core', 'emailTestSuccessful', '') === '0') {
594
-			return false;
595
-		}
596
-
597
-		return true;
598
-	}
599
-
600
-	protected function hasValidTransactionIsolationLevel(): bool {
601
-		try {
602
-			if ($this->db->getDatabasePlatform() instanceof SqlitePlatform) {
603
-				return true;
604
-			}
605
-
606
-			return $this->db->getTransactionIsolation() === TransactionIsolationLevel::READ_COMMITTED;
607
-		} catch (Exception $e) {
608
-			// ignore
609
-		}
610
-
611
-		return true;
612
-	}
613
-
614
-	protected function hasFileinfoInstalled(): bool {
615
-		return \OC_Util::fileInfoLoaded();
616
-	}
617
-
618
-	protected function hasWorkingFileLocking(): bool {
619
-		return !($this->lockingProvider instanceof NoopLockingProvider);
620
-	}
621
-
622
-	protected function getSuggestedOverwriteCliURL(): string {
623
-		$currentOverwriteCliUrl = $this->config->getSystemValue('overwrite.cli.url', '');
624
-		$suggestedOverwriteCliUrl = $this->request->getServerProtocol() . '://' . $this->request->getInsecureServerHost() . \OC::$WEBROOT;
625
-
626
-		// Check correctness by checking if it is a valid URL
627
-		if (filter_var($currentOverwriteCliUrl, FILTER_VALIDATE_URL)) {
628
-			$suggestedOverwriteCliUrl = '';
629
-		}
630
-
631
-		return $suggestedOverwriteCliUrl;
632
-	}
633
-
634
-	protected function getLastCronInfo(): array {
635
-		$lastCronRun = $this->config->getAppValue('core', 'lastcron', 0);
636
-		return [
637
-			'diffInSeconds' => time() - $lastCronRun,
638
-			'relativeTime' => $this->dateTimeFormatter->formatTimeSpan($lastCronRun),
639
-			'backgroundJobsUrl' => $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'server']) . '#backgroundjobs',
640
-		];
641
-	}
642
-
643
-	protected function getCronErrors() {
644
-		$errors = json_decode($this->config->getAppValue('core', 'cronErrors', ''), true);
645
-
646
-		if (is_array($errors)) {
647
-			return $errors;
648
-		}
649
-
650
-		return [];
651
-	}
652
-
653
-	private function isTemporaryDirectoryWritable(): bool {
654
-		try {
655
-			if (!empty($this->tempManager->getTempBaseDir())) {
656
-				return true;
657
-			}
658
-		} catch (\Exception $e) {
659
-		}
660
-		return false;
661
-	}
662
-
663
-	/**
664
-	 * Iterates through the configured app roots and
665
-	 * tests if the subdirectories are owned by the same user than the current user.
666
-	 *
667
-	 * @return array
668
-	 */
669
-	protected function getAppDirsWithDifferentOwner(): array {
670
-		$currentUser = posix_getuid();
671
-		$appDirsWithDifferentOwner = [[]];
672
-
673
-		foreach (OC::$APPSROOTS as $appRoot) {
674
-			if ($appRoot['writable'] === true) {
675
-				$appDirsWithDifferentOwner[] = $this->getAppDirsWithDifferentOwnerForAppRoot($currentUser, $appRoot);
676
-			}
677
-		}
678
-
679
-		$appDirsWithDifferentOwner = array_merge(...$appDirsWithDifferentOwner);
680
-		sort($appDirsWithDifferentOwner);
681
-
682
-		return $appDirsWithDifferentOwner;
683
-	}
684
-
685
-	/**
686
-	 * Tests if the directories for one apps directory are writable by the current user.
687
-	 *
688
-	 * @param int $currentUser The current user
689
-	 * @param array $appRoot The app root config
690
-	 * @return string[] The none writable directory paths inside the app root
691
-	 */
692
-	private function getAppDirsWithDifferentOwnerForAppRoot(int $currentUser, array $appRoot): array {
693
-		$appDirsWithDifferentOwner = [];
694
-		$appsPath = $appRoot['path'];
695
-		$appsDir = new DirectoryIterator($appRoot['path']);
696
-
697
-		foreach ($appsDir as $fileInfo) {
698
-			if ($fileInfo->isDir() && !$fileInfo->isDot()) {
699
-				$absAppPath = $appsPath . DIRECTORY_SEPARATOR . $fileInfo->getFilename();
700
-				$appDirUser = fileowner($absAppPath);
701
-				if ($appDirUser !== $currentUser) {
702
-					$appDirsWithDifferentOwner[] = $absAppPath;
703
-				}
704
-			}
705
-		}
706
-
707
-		return $appDirsWithDifferentOwner;
708
-	}
709
-
710
-	/**
711
-	 * Checks for potential PHP modules that would improve the instance
712
-	 *
713
-	 * @return string[] A list of PHP modules that is recommended
714
-	 */
715
-	protected function hasRecommendedPHPModules(): array {
716
-		$recommendedPHPModules = [];
717
-
718
-		if (!extension_loaded('intl')) {
719
-			$recommendedPHPModules[] = 'intl';
720
-		}
721
-
722
-		if (!extension_loaded('sysvsem')) {
723
-			// used to limit the usage of resources by preview generator
724
-			$recommendedPHPModules[] = 'sysvsem';
725
-		}
726
-
727
-		if (!extension_loaded('exif')) {
728
-			// used to extract metadata from images
729
-			// required for correct orientation of preview images
730
-			$recommendedPHPModules[] = 'exif';
731
-		}
732
-
733
-		if (!defined('PASSWORD_ARGON2I')) {
734
-			// Installing php-sodium on >=php7.4 will provide PASSWORD_ARGON2I
735
-			// on previous version argon2 wasn't part of the "standard" extension
736
-			// and RedHat disabled it so even installing php-sodium won't provide argon2i
737
-			// support in password_hash/password_verify.
738
-			$recommendedPHPModules[] = 'sodium';
739
-		}
740
-
741
-		return $recommendedPHPModules;
742
-	}
743
-
744
-	protected function isImagickEnabled(): bool {
745
-		if ($this->config->getAppValue('theming', 'enabled', 'no') === 'yes') {
746
-			if (!extension_loaded('imagick')) {
747
-				return false;
748
-			}
749
-		}
750
-		return true;
751
-	}
752
-
753
-	protected function areWebauthnExtensionsEnabled(): bool {
754
-		if (!extension_loaded('bcmath')) {
755
-			return false;
756
-		}
757
-		if (!extension_loaded('gmp')) {
758
-			return false;
759
-		}
760
-		return true;
761
-	}
762
-
763
-	protected function is64bit(): bool {
764
-		if (PHP_INT_SIZE < 8) {
765
-			return false;
766
-		} else {
767
-			return true;
768
-		}
769
-	}
770
-
771
-	protected function isMysqlUsedWithoutUTF8MB4(): bool {
772
-		return ($this->config->getSystemValue('dbtype', 'sqlite') === 'mysql') && ($this->config->getSystemValue('mysql.utf8mb4', false) === false);
773
-	}
774
-
775
-	protected function hasBigIntConversionPendingColumns(): array {
776
-		// copy of ConvertFilecacheBigInt::getColumnsByTable()
777
-		$tables = [
778
-			'activity' => ['activity_id', 'object_id'],
779
-			'activity_mq' => ['mail_id'],
780
-			'authtoken' => ['id'],
781
-			'bruteforce_attempts' => ['id'],
782
-			'federated_reshares' => ['share_id'],
783
-			'filecache' => ['fileid', 'storage', 'parent', 'mimetype', 'mimepart', 'mtime', 'storage_mtime'],
784
-			'filecache_extended' => ['fileid'],
785
-			'files_trash' => ['auto_id'],
786
-			'file_locks' => ['id'],
787
-			'file_metadata' => ['id'],
788
-			'jobs' => ['id'],
789
-			'mimetypes' => ['id'],
790
-			'mounts' => ['id', 'storage_id', 'root_id', 'mount_id'],
791
-			'share_external' => ['id', 'parent'],
792
-			'storages' => ['numeric_id'],
793
-		];
794
-
795
-		$schema = new SchemaWrapper($this->db);
796
-		$isSqlite = $this->db->getDatabasePlatform() instanceof SqlitePlatform;
797
-		$pendingColumns = [];
798
-
799
-		foreach ($tables as $tableName => $columns) {
800
-			if (!$schema->hasTable($tableName)) {
801
-				continue;
802
-			}
803
-
804
-			$table = $schema->getTable($tableName);
805
-			foreach ($columns as $columnName) {
806
-				$column = $table->getColumn($columnName);
807
-				$isAutoIncrement = $column->getAutoincrement();
808
-				$isAutoIncrementOnSqlite = $isSqlite && $isAutoIncrement;
809
-				if ($column->getType()->getName() !== Types::BIGINT && !$isAutoIncrementOnSqlite) {
810
-					$pendingColumns[] = $tableName . '.' . $columnName;
811
-				}
812
-			}
813
-		}
814
-
815
-		return $pendingColumns;
816
-	}
817
-
818
-	protected function isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed(): bool {
819
-		$objectStore = $this->config->getSystemValue('objectstore', null);
820
-		$objectStoreMultibucket = $this->config->getSystemValue('objectstore_multibucket', null);
821
-
822
-		if (!isset($objectStoreMultibucket) && !isset($objectStore)) {
823
-			return true;
824
-		}
825
-
826
-		if (isset($objectStoreMultibucket['class']) && $objectStoreMultibucket['class'] !== 'OC\\Files\\ObjectStore\\S3') {
827
-			return true;
828
-		}
829
-
830
-		if (isset($objectStore['class']) && $objectStore['class'] !== 'OC\\Files\\ObjectStore\\S3') {
831
-			return true;
832
-		}
833
-
834
-		$tempPath = sys_get_temp_dir();
835
-		if (!is_dir($tempPath)) {
836
-			$this->logger->error('Error while checking the temporary PHP path - it was not properly set to a directory. Returned value: ' . $tempPath);
837
-			return false;
838
-		}
839
-		$freeSpaceInTemp = function_exists('disk_free_space') ? disk_free_space($tempPath) : false;
840
-		if ($freeSpaceInTemp === false) {
841
-			$this->logger->error('Error while checking the available disk space of temporary PHP path or no free disk space returned. Temporary path: ' . $tempPath);
842
-			return false;
843
-		}
844
-
845
-		$freeSpaceInTempInGB = $freeSpaceInTemp / 1024 / 1024 / 1024;
846
-		if ($freeSpaceInTempInGB > 50) {
847
-			return true;
848
-		}
849
-
850
-		$this->logger->warning('Checking the available space in the temporary path resulted in ' . round($freeSpaceInTempInGB, 1) . ' GB instead of the recommended 50GB. Path: ' . $tempPath);
851
-		return false;
852
-	}
853
-
854
-	protected function imageMagickLacksSVGSupport(): bool {
855
-		return extension_loaded('imagick') && count(\Imagick::queryFormats('SVG')) === 0;
856
-	}
857
-
858
-	/**
859
-	 * @return DataResponse
860
-	 * @AuthorizedAdminSetting(settings=OCA\Settings\Settings\Admin\Overview)
861
-	 */
862
-	public function check() {
863
-		$phpDefaultCharset = new PhpDefaultCharset();
864
-		$phpOutputBuffering = new PhpOutputBuffering();
865
-		$legacySSEKeyFormat = new LegacySSEKeyFormat($this->l10n, $this->config, $this->urlGenerator);
866
-		$checkUserCertificates = new CheckUserCertificates($this->l10n, $this->config, $this->urlGenerator);
867
-		$supportedDatabases = new SupportedDatabase($this->l10n, $this->connection);
868
-		$ldapInvalidUuids = new LdapInvalidUuids($this->appManager, $this->l10n, $this->serverContainer);
869
-
870
-		return new DataResponse(
871
-			[
872
-				'isGetenvServerWorking' => !empty(getenv('PATH')),
873
-				'isReadOnlyConfig' => $this->isReadOnlyConfig(),
874
-				'hasValidTransactionIsolationLevel' => $this->hasValidTransactionIsolationLevel(),
875
-				'wasEmailTestSuccessful' => $this->wasEmailTestSuccessful(),
876
-				'hasFileinfoInstalled' => $this->hasFileinfoInstalled(),
877
-				'hasWorkingFileLocking' => $this->hasWorkingFileLocking(),
878
-				'suggestedOverwriteCliURL' => $this->getSuggestedOverwriteCliURL(),
879
-				'cronInfo' => $this->getLastCronInfo(),
880
-				'cronErrors' => $this->getCronErrors(),
881
-				'isFairUseOfFreePushService' => $this->isFairUseOfFreePushService(),
882
-				'serverHasInternetConnectionProblems' => $this->hasInternetConnectivityProblems(),
883
-				'isMemcacheConfigured' => $this->isMemcacheConfigured(),
884
-				'memcacheDocs' => $this->urlGenerator->linkToDocs('admin-performance'),
885
-				'isRandomnessSecure' => $this->isRandomnessSecure(),
886
-				'securityDocs' => $this->urlGenerator->linkToDocs('admin-security'),
887
-				'isUsedTlsLibOutdated' => $this->isUsedTlsLibOutdated(),
888
-				'phpSupported' => $this->isPhpSupported(),
889
-				'forwardedForHeadersWorking' => $this->forwardedForHeadersWorking(),
890
-				'reverseProxyDocs' => $this->urlGenerator->linkToDocs('admin-reverse-proxy'),
891
-				'isCorrectMemcachedPHPModuleInstalled' => $this->isCorrectMemcachedPHPModuleInstalled(),
892
-				'hasPassedCodeIntegrityCheck' => $this->checker->hasPassedCheck(),
893
-				'codeIntegrityCheckerDocumentation' => $this->urlGenerator->linkToDocs('admin-code-integrity'),
894
-				'OpcacheSetupRecommendations' => $this->getOpcacheSetupRecommendations(),
895
-				'isSettimelimitAvailable' => $this->isSettimelimitAvailable(),
896
-				'hasFreeTypeSupport' => $this->hasFreeTypeSupport(),
897
-				'missingPrimaryKeys' => $this->hasMissingPrimaryKeys(),
898
-				'missingIndexes' => $this->hasMissingIndexes(),
899
-				'missingColumns' => $this->hasMissingColumns(),
900
-				'isSqliteUsed' => $this->isSqliteUsed(),
901
-				'databaseConversionDocumentation' => $this->urlGenerator->linkToDocs('admin-db-conversion'),
902
-				'isMemoryLimitSufficient' => $this->memoryInfo->isMemoryLimitSufficient(),
903
-				'appDirsWithDifferentOwner' => $this->getAppDirsWithDifferentOwner(),
904
-				'isImagickEnabled' => $this->isImagickEnabled(),
905
-				'areWebauthnExtensionsEnabled' => $this->areWebauthnExtensionsEnabled(),
906
-				'is64bit' => $this->is64bit(),
907
-				'recommendedPHPModules' => $this->hasRecommendedPHPModules(),
908
-				'pendingBigIntConversionColumns' => $this->hasBigIntConversionPendingColumns(),
909
-				'isMysqlUsedWithoutUTF8MB4' => $this->isMysqlUsedWithoutUTF8MB4(),
910
-				'isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed' => $this->isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed(),
911
-				'reverseProxyGeneratedURL' => $this->urlGenerator->getAbsoluteURL('index.php'),
912
-				'imageMagickLacksSVGSupport' => $this->imageMagickLacksSVGSupport(),
913
-				PhpDefaultCharset::class => ['pass' => $phpDefaultCharset->run(), 'description' => $phpDefaultCharset->description(), 'severity' => $phpDefaultCharset->severity()],
914
-				PhpOutputBuffering::class => ['pass' => $phpOutputBuffering->run(), 'description' => $phpOutputBuffering->description(), 'severity' => $phpOutputBuffering->severity()],
915
-				LegacySSEKeyFormat::class => ['pass' => $legacySSEKeyFormat->run(), 'description' => $legacySSEKeyFormat->description(), 'severity' => $legacySSEKeyFormat->severity(), 'linkToDocumentation' => $legacySSEKeyFormat->linkToDocumentation()],
916
-				CheckUserCertificates::class => ['pass' => $checkUserCertificates->run(), 'description' => $checkUserCertificates->description(), 'severity' => $checkUserCertificates->severity(), 'elements' => $checkUserCertificates->elements()],
917
-				'isDefaultPhoneRegionSet' => $this->config->getSystemValueString('default_phone_region', '') !== '',
918
-				SupportedDatabase::class => ['pass' => $supportedDatabases->run(), 'description' => $supportedDatabases->description(), 'severity' => $supportedDatabases->severity()],
919
-				'temporaryDirectoryWritable' => $this->isTemporaryDirectoryWritable(),
920
-				LdapInvalidUuids::class => ['pass' => $ldapInvalidUuids->run(), 'description' => $ldapInvalidUuids->description(), 'severity' => $ldapInvalidUuids->severity()],
921
-			]
922
-		);
923
-	}
455
+            $formattedTextResponse .= print_r($completeResults, true);
456
+        } else {
457
+            $formattedTextResponse = 'No errors have been found.';
458
+        }
459
+
460
+
461
+        return new DataDisplayResponse(
462
+            $formattedTextResponse,
463
+            Http::STATUS_OK,
464
+            [
465
+                'Content-Type' => 'text/plain',
466
+            ]
467
+        );
468
+    }
469
+
470
+    /**
471
+     * Checks whether a PHP OPcache is properly set up
472
+     * @return string[] The list of OPcache setup recommendations
473
+     */
474
+    protected function getOpcacheSetupRecommendations(): array {
475
+        // If the module is not loaded, return directly to skip inapplicable checks
476
+        if (!extension_loaded('Zend OPcache')) {
477
+            return [$this->l10n->t('The PHP OPcache module is not loaded. For better performance it is recommended to load it into your PHP installation.')];
478
+        }
479
+
480
+        $recommendations = [];
481
+
482
+        // Check whether Nextcloud is allowed to use the OPcache API
483
+        $isPermitted = true;
484
+        $permittedPath = $this->iniGetWrapper->getString('opcache.restrict_api');
485
+        if (isset($permittedPath) && $permittedPath !== '' && !str_starts_with(\OC::$SERVERROOT, rtrim($permittedPath, '/'))) {
486
+            $isPermitted = false;
487
+        }
488
+
489
+        if (!$this->iniGetWrapper->getBool('opcache.enable')) {
490
+            $recommendations[] = $this->l10n->t('OPcache is disabled. For better performance, it is recommended to apply <code>opcache.enable=1</code> to your PHP configuration.');
491
+
492
+            // Check for saved comments only when OPcache is currently disabled. If it was enabled, opcache.save_comments=0 would break Nextcloud in the first place.
493
+            if (!$this->iniGetWrapper->getBool('opcache.save_comments')) {
494
+                $recommendations[] = $this->l10n->t('OPcache is configured to remove code comments. With OPcache enabled, <code>opcache.save_comments=1</code> must be set for Nextcloud to function.');
495
+            }
496
+
497
+            if (!$isPermitted) {
498
+                $recommendations[] = $this->l10n->t('Nextcloud is not allowed to use the OPcache API. With OPcache enabled, it is highly recommended to include all Nextcloud directories with <code>opcache.restrict_api</code> or unset this setting to disable OPcache API restrictions, to prevent errors during Nextcloud core or app upgrades.');
499
+            }
500
+        } elseif (!$isPermitted) {
501
+            $recommendations[] = $this->l10n->t('Nextcloud is not allowed to use the OPcache API. It is highly recommended to include all Nextcloud directories with <code>opcache.restrict_api</code> or unset this setting to disable OPcache API restrictions, to prevent errors during Nextcloud core or app upgrades.');
502
+        } elseif ($this->iniGetWrapper->getBool('opcache.file_cache_only')) {
503
+            $recommendations[] = $this->l10n->t('The shared memory based OPcache is disabled. For better performance, it is recommended to apply <code>opcache.file_cache_only=0</code> to your PHP configuration and use the file cache as second level cache only.');
504
+        } else {
505
+            // Check whether opcache_get_status has been explicitly disabled an in case skip usage based checks
506
+            $disabledFunctions = $this->iniGetWrapper->getString('disable_functions');
507
+            if (isset($disabledFunctions) && str_contains($disabledFunctions, 'opcache_get_status')) {
508
+                return [];
509
+            }
510
+
511
+            $status = opcache_get_status(false);
512
+
513
+            // Recommend to raise value, if more than 90% of max value is reached
514
+            if (
515
+                empty($status['opcache_statistics']['max_cached_keys']) ||
516
+                ($status['opcache_statistics']['num_cached_keys'] / $status['opcache_statistics']['max_cached_keys'] > 0.9)
517
+            ) {
518
+                $recommendations[] = $this->l10n->t('The maximum number of OPcache keys is nearly exceeded. To assure that all scripts can be kept in the cache, it is recommended to apply <code>opcache.max_accelerated_files</code> to your PHP configuration with a value higher than <code>%s</code>.', [($this->iniGetWrapper->getNumeric('opcache.max_accelerated_files') ?: 'currently')]);
519
+            }
520
+
521
+            if (
522
+                empty($status['memory_usage']['free_memory']) ||
523
+                ($status['memory_usage']['used_memory'] / $status['memory_usage']['free_memory'] > 9)
524
+            ) {
525
+                $recommendations[] = $this->l10n->t('The OPcache buffer is nearly full. To assure that all scripts can be hold in cache, it is recommended to apply <code>opcache.memory_consumption</code> to your PHP configuration with a value higher than <code>%s</code>.', [($this->iniGetWrapper->getNumeric('opcache.memory_consumption') ?: 'currently')]);
526
+            }
527
+
528
+            if (
529
+                // Do not recommend to raise the interned strings buffer size above a quarter of the total OPcache size
530
+                ($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') < $this->iniGetWrapper->getNumeric('opcache.memory_consumption') / 4) &&
531
+                (
532
+                    empty($status['interned_strings_usage']['free_memory']) ||
533
+                    ($status['interned_strings_usage']['used_memory'] / $status['interned_strings_usage']['free_memory'] > 9)
534
+                )
535
+            ) {
536
+                $recommendations[] = $this->l10n->t('The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply <code>opcache.interned_strings_buffer</code> to your PHP configuration with a value higher than <code>%s</code>.', [($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') ?: 'currently')]);
537
+            }
538
+        }
539
+
540
+        return $recommendations;
541
+    }
542
+
543
+    /**
544
+     * Check if the required FreeType functions are present
545
+     * @return bool
546
+     */
547
+    protected function hasFreeTypeSupport() {
548
+        return function_exists('imagettfbbox') && function_exists('imagettftext');
549
+    }
550
+
551
+    protected function hasMissingIndexes(): array {
552
+        $indexInfo = new MissingIndexInformation();
553
+        // Dispatch event so apps can also hint for pending index updates if needed
554
+        $event = new GenericEvent($indexInfo);
555
+        $this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_INDEXES_EVENT, $event);
556
+
557
+        return $indexInfo->getListOfMissingIndexes();
558
+    }
559
+
560
+    protected function hasMissingPrimaryKeys(): array {
561
+        $info = new MissingPrimaryKeyInformation();
562
+        // Dispatch event so apps can also hint for pending index updates if needed
563
+        $event = new GenericEvent($info);
564
+        $this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_PRIMARY_KEYS_EVENT, $event);
565
+
566
+        return $info->getListOfMissingPrimaryKeys();
567
+    }
568
+
569
+    protected function hasMissingColumns(): array {
570
+        $indexInfo = new MissingColumnInformation();
571
+        // Dispatch event so apps can also hint for pending index updates if needed
572
+        $event = new GenericEvent($indexInfo);
573
+        $this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_COLUMNS_EVENT, $event);
574
+
575
+        return $indexInfo->getListOfMissingColumns();
576
+    }
577
+
578
+    protected function isSqliteUsed() {
579
+        return strpos($this->config->getSystemValue('dbtype'), 'sqlite') !== false;
580
+    }
581
+
582
+    protected function isReadOnlyConfig(): bool {
583
+        return \OC_Helper::isReadOnlyConfigEnabled();
584
+    }
585
+
586
+    protected function wasEmailTestSuccessful(): bool {
587
+        // Handle the case that the configuration was set before the check was introduced or it was only set via command line and not from the UI
588
+        if ($this->config->getAppValue('core', 'emailTestSuccessful', '') === '' && $this->config->getSystemValue('mail_domain', '') === '') {
589
+            return false;
590
+        }
591
+
592
+        // The mail test was unsuccessful or the config was changed using the UI without verifying with a testmail, hence return false
593
+        if ($this->config->getAppValue('core', 'emailTestSuccessful', '') === '0') {
594
+            return false;
595
+        }
596
+
597
+        return true;
598
+    }
599
+
600
+    protected function hasValidTransactionIsolationLevel(): bool {
601
+        try {
602
+            if ($this->db->getDatabasePlatform() instanceof SqlitePlatform) {
603
+                return true;
604
+            }
605
+
606
+            return $this->db->getTransactionIsolation() === TransactionIsolationLevel::READ_COMMITTED;
607
+        } catch (Exception $e) {
608
+            // ignore
609
+        }
610
+
611
+        return true;
612
+    }
613
+
614
+    protected function hasFileinfoInstalled(): bool {
615
+        return \OC_Util::fileInfoLoaded();
616
+    }
617
+
618
+    protected function hasWorkingFileLocking(): bool {
619
+        return !($this->lockingProvider instanceof NoopLockingProvider);
620
+    }
621
+
622
+    protected function getSuggestedOverwriteCliURL(): string {
623
+        $currentOverwriteCliUrl = $this->config->getSystemValue('overwrite.cli.url', '');
624
+        $suggestedOverwriteCliUrl = $this->request->getServerProtocol() . '://' . $this->request->getInsecureServerHost() . \OC::$WEBROOT;
625
+
626
+        // Check correctness by checking if it is a valid URL
627
+        if (filter_var($currentOverwriteCliUrl, FILTER_VALIDATE_URL)) {
628
+            $suggestedOverwriteCliUrl = '';
629
+        }
630
+
631
+        return $suggestedOverwriteCliUrl;
632
+    }
633
+
634
+    protected function getLastCronInfo(): array {
635
+        $lastCronRun = $this->config->getAppValue('core', 'lastcron', 0);
636
+        return [
637
+            'diffInSeconds' => time() - $lastCronRun,
638
+            'relativeTime' => $this->dateTimeFormatter->formatTimeSpan($lastCronRun),
639
+            'backgroundJobsUrl' => $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'server']) . '#backgroundjobs',
640
+        ];
641
+    }
642
+
643
+    protected function getCronErrors() {
644
+        $errors = json_decode($this->config->getAppValue('core', 'cronErrors', ''), true);
645
+
646
+        if (is_array($errors)) {
647
+            return $errors;
648
+        }
649
+
650
+        return [];
651
+    }
652
+
653
+    private function isTemporaryDirectoryWritable(): bool {
654
+        try {
655
+            if (!empty($this->tempManager->getTempBaseDir())) {
656
+                return true;
657
+            }
658
+        } catch (\Exception $e) {
659
+        }
660
+        return false;
661
+    }
662
+
663
+    /**
664
+     * Iterates through the configured app roots and
665
+     * tests if the subdirectories are owned by the same user than the current user.
666
+     *
667
+     * @return array
668
+     */
669
+    protected function getAppDirsWithDifferentOwner(): array {
670
+        $currentUser = posix_getuid();
671
+        $appDirsWithDifferentOwner = [[]];
672
+
673
+        foreach (OC::$APPSROOTS as $appRoot) {
674
+            if ($appRoot['writable'] === true) {
675
+                $appDirsWithDifferentOwner[] = $this->getAppDirsWithDifferentOwnerForAppRoot($currentUser, $appRoot);
676
+            }
677
+        }
678
+
679
+        $appDirsWithDifferentOwner = array_merge(...$appDirsWithDifferentOwner);
680
+        sort($appDirsWithDifferentOwner);
681
+
682
+        return $appDirsWithDifferentOwner;
683
+    }
684
+
685
+    /**
686
+     * Tests if the directories for one apps directory are writable by the current user.
687
+     *
688
+     * @param int $currentUser The current user
689
+     * @param array $appRoot The app root config
690
+     * @return string[] The none writable directory paths inside the app root
691
+     */
692
+    private function getAppDirsWithDifferentOwnerForAppRoot(int $currentUser, array $appRoot): array {
693
+        $appDirsWithDifferentOwner = [];
694
+        $appsPath = $appRoot['path'];
695
+        $appsDir = new DirectoryIterator($appRoot['path']);
696
+
697
+        foreach ($appsDir as $fileInfo) {
698
+            if ($fileInfo->isDir() && !$fileInfo->isDot()) {
699
+                $absAppPath = $appsPath . DIRECTORY_SEPARATOR . $fileInfo->getFilename();
700
+                $appDirUser = fileowner($absAppPath);
701
+                if ($appDirUser !== $currentUser) {
702
+                    $appDirsWithDifferentOwner[] = $absAppPath;
703
+                }
704
+            }
705
+        }
706
+
707
+        return $appDirsWithDifferentOwner;
708
+    }
709
+
710
+    /**
711
+     * Checks for potential PHP modules that would improve the instance
712
+     *
713
+     * @return string[] A list of PHP modules that is recommended
714
+     */
715
+    protected function hasRecommendedPHPModules(): array {
716
+        $recommendedPHPModules = [];
717
+
718
+        if (!extension_loaded('intl')) {
719
+            $recommendedPHPModules[] = 'intl';
720
+        }
721
+
722
+        if (!extension_loaded('sysvsem')) {
723
+            // used to limit the usage of resources by preview generator
724
+            $recommendedPHPModules[] = 'sysvsem';
725
+        }
726
+
727
+        if (!extension_loaded('exif')) {
728
+            // used to extract metadata from images
729
+            // required for correct orientation of preview images
730
+            $recommendedPHPModules[] = 'exif';
731
+        }
732
+
733
+        if (!defined('PASSWORD_ARGON2I')) {
734
+            // Installing php-sodium on >=php7.4 will provide PASSWORD_ARGON2I
735
+            // on previous version argon2 wasn't part of the "standard" extension
736
+            // and RedHat disabled it so even installing php-sodium won't provide argon2i
737
+            // support in password_hash/password_verify.
738
+            $recommendedPHPModules[] = 'sodium';
739
+        }
740
+
741
+        return $recommendedPHPModules;
742
+    }
743
+
744
+    protected function isImagickEnabled(): bool {
745
+        if ($this->config->getAppValue('theming', 'enabled', 'no') === 'yes') {
746
+            if (!extension_loaded('imagick')) {
747
+                return false;
748
+            }
749
+        }
750
+        return true;
751
+    }
752
+
753
+    protected function areWebauthnExtensionsEnabled(): bool {
754
+        if (!extension_loaded('bcmath')) {
755
+            return false;
756
+        }
757
+        if (!extension_loaded('gmp')) {
758
+            return false;
759
+        }
760
+        return true;
761
+    }
762
+
763
+    protected function is64bit(): bool {
764
+        if (PHP_INT_SIZE < 8) {
765
+            return false;
766
+        } else {
767
+            return true;
768
+        }
769
+    }
770
+
771
+    protected function isMysqlUsedWithoutUTF8MB4(): bool {
772
+        return ($this->config->getSystemValue('dbtype', 'sqlite') === 'mysql') && ($this->config->getSystemValue('mysql.utf8mb4', false) === false);
773
+    }
774
+
775
+    protected function hasBigIntConversionPendingColumns(): array {
776
+        // copy of ConvertFilecacheBigInt::getColumnsByTable()
777
+        $tables = [
778
+            'activity' => ['activity_id', 'object_id'],
779
+            'activity_mq' => ['mail_id'],
780
+            'authtoken' => ['id'],
781
+            'bruteforce_attempts' => ['id'],
782
+            'federated_reshares' => ['share_id'],
783
+            'filecache' => ['fileid', 'storage', 'parent', 'mimetype', 'mimepart', 'mtime', 'storage_mtime'],
784
+            'filecache_extended' => ['fileid'],
785
+            'files_trash' => ['auto_id'],
786
+            'file_locks' => ['id'],
787
+            'file_metadata' => ['id'],
788
+            'jobs' => ['id'],
789
+            'mimetypes' => ['id'],
790
+            'mounts' => ['id', 'storage_id', 'root_id', 'mount_id'],
791
+            'share_external' => ['id', 'parent'],
792
+            'storages' => ['numeric_id'],
793
+        ];
794
+
795
+        $schema = new SchemaWrapper($this->db);
796
+        $isSqlite = $this->db->getDatabasePlatform() instanceof SqlitePlatform;
797
+        $pendingColumns = [];
798
+
799
+        foreach ($tables as $tableName => $columns) {
800
+            if (!$schema->hasTable($tableName)) {
801
+                continue;
802
+            }
803
+
804
+            $table = $schema->getTable($tableName);
805
+            foreach ($columns as $columnName) {
806
+                $column = $table->getColumn($columnName);
807
+                $isAutoIncrement = $column->getAutoincrement();
808
+                $isAutoIncrementOnSqlite = $isSqlite && $isAutoIncrement;
809
+                if ($column->getType()->getName() !== Types::BIGINT && !$isAutoIncrementOnSqlite) {
810
+                    $pendingColumns[] = $tableName . '.' . $columnName;
811
+                }
812
+            }
813
+        }
814
+
815
+        return $pendingColumns;
816
+    }
817
+
818
+    protected function isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed(): bool {
819
+        $objectStore = $this->config->getSystemValue('objectstore', null);
820
+        $objectStoreMultibucket = $this->config->getSystemValue('objectstore_multibucket', null);
821
+
822
+        if (!isset($objectStoreMultibucket) && !isset($objectStore)) {
823
+            return true;
824
+        }
825
+
826
+        if (isset($objectStoreMultibucket['class']) && $objectStoreMultibucket['class'] !== 'OC\\Files\\ObjectStore\\S3') {
827
+            return true;
828
+        }
829
+
830
+        if (isset($objectStore['class']) && $objectStore['class'] !== 'OC\\Files\\ObjectStore\\S3') {
831
+            return true;
832
+        }
833
+
834
+        $tempPath = sys_get_temp_dir();
835
+        if (!is_dir($tempPath)) {
836
+            $this->logger->error('Error while checking the temporary PHP path - it was not properly set to a directory. Returned value: ' . $tempPath);
837
+            return false;
838
+        }
839
+        $freeSpaceInTemp = function_exists('disk_free_space') ? disk_free_space($tempPath) : false;
840
+        if ($freeSpaceInTemp === false) {
841
+            $this->logger->error('Error while checking the available disk space of temporary PHP path or no free disk space returned. Temporary path: ' . $tempPath);
842
+            return false;
843
+        }
844
+
845
+        $freeSpaceInTempInGB = $freeSpaceInTemp / 1024 / 1024 / 1024;
846
+        if ($freeSpaceInTempInGB > 50) {
847
+            return true;
848
+        }
849
+
850
+        $this->logger->warning('Checking the available space in the temporary path resulted in ' . round($freeSpaceInTempInGB, 1) . ' GB instead of the recommended 50GB. Path: ' . $tempPath);
851
+        return false;
852
+    }
853
+
854
+    protected function imageMagickLacksSVGSupport(): bool {
855
+        return extension_loaded('imagick') && count(\Imagick::queryFormats('SVG')) === 0;
856
+    }
857
+
858
+    /**
859
+     * @return DataResponse
860
+     * @AuthorizedAdminSetting(settings=OCA\Settings\Settings\Admin\Overview)
861
+     */
862
+    public function check() {
863
+        $phpDefaultCharset = new PhpDefaultCharset();
864
+        $phpOutputBuffering = new PhpOutputBuffering();
865
+        $legacySSEKeyFormat = new LegacySSEKeyFormat($this->l10n, $this->config, $this->urlGenerator);
866
+        $checkUserCertificates = new CheckUserCertificates($this->l10n, $this->config, $this->urlGenerator);
867
+        $supportedDatabases = new SupportedDatabase($this->l10n, $this->connection);
868
+        $ldapInvalidUuids = new LdapInvalidUuids($this->appManager, $this->l10n, $this->serverContainer);
869
+
870
+        return new DataResponse(
871
+            [
872
+                'isGetenvServerWorking' => !empty(getenv('PATH')),
873
+                'isReadOnlyConfig' => $this->isReadOnlyConfig(),
874
+                'hasValidTransactionIsolationLevel' => $this->hasValidTransactionIsolationLevel(),
875
+                'wasEmailTestSuccessful' => $this->wasEmailTestSuccessful(),
876
+                'hasFileinfoInstalled' => $this->hasFileinfoInstalled(),
877
+                'hasWorkingFileLocking' => $this->hasWorkingFileLocking(),
878
+                'suggestedOverwriteCliURL' => $this->getSuggestedOverwriteCliURL(),
879
+                'cronInfo' => $this->getLastCronInfo(),
880
+                'cronErrors' => $this->getCronErrors(),
881
+                'isFairUseOfFreePushService' => $this->isFairUseOfFreePushService(),
882
+                'serverHasInternetConnectionProblems' => $this->hasInternetConnectivityProblems(),
883
+                'isMemcacheConfigured' => $this->isMemcacheConfigured(),
884
+                'memcacheDocs' => $this->urlGenerator->linkToDocs('admin-performance'),
885
+                'isRandomnessSecure' => $this->isRandomnessSecure(),
886
+                'securityDocs' => $this->urlGenerator->linkToDocs('admin-security'),
887
+                'isUsedTlsLibOutdated' => $this->isUsedTlsLibOutdated(),
888
+                'phpSupported' => $this->isPhpSupported(),
889
+                'forwardedForHeadersWorking' => $this->forwardedForHeadersWorking(),
890
+                'reverseProxyDocs' => $this->urlGenerator->linkToDocs('admin-reverse-proxy'),
891
+                'isCorrectMemcachedPHPModuleInstalled' => $this->isCorrectMemcachedPHPModuleInstalled(),
892
+                'hasPassedCodeIntegrityCheck' => $this->checker->hasPassedCheck(),
893
+                'codeIntegrityCheckerDocumentation' => $this->urlGenerator->linkToDocs('admin-code-integrity'),
894
+                'OpcacheSetupRecommendations' => $this->getOpcacheSetupRecommendations(),
895
+                'isSettimelimitAvailable' => $this->isSettimelimitAvailable(),
896
+                'hasFreeTypeSupport' => $this->hasFreeTypeSupport(),
897
+                'missingPrimaryKeys' => $this->hasMissingPrimaryKeys(),
898
+                'missingIndexes' => $this->hasMissingIndexes(),
899
+                'missingColumns' => $this->hasMissingColumns(),
900
+                'isSqliteUsed' => $this->isSqliteUsed(),
901
+                'databaseConversionDocumentation' => $this->urlGenerator->linkToDocs('admin-db-conversion'),
902
+                'isMemoryLimitSufficient' => $this->memoryInfo->isMemoryLimitSufficient(),
903
+                'appDirsWithDifferentOwner' => $this->getAppDirsWithDifferentOwner(),
904
+                'isImagickEnabled' => $this->isImagickEnabled(),
905
+                'areWebauthnExtensionsEnabled' => $this->areWebauthnExtensionsEnabled(),
906
+                'is64bit' => $this->is64bit(),
907
+                'recommendedPHPModules' => $this->hasRecommendedPHPModules(),
908
+                'pendingBigIntConversionColumns' => $this->hasBigIntConversionPendingColumns(),
909
+                'isMysqlUsedWithoutUTF8MB4' => $this->isMysqlUsedWithoutUTF8MB4(),
910
+                'isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed' => $this->isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed(),
911
+                'reverseProxyGeneratedURL' => $this->urlGenerator->getAbsoluteURL('index.php'),
912
+                'imageMagickLacksSVGSupport' => $this->imageMagickLacksSVGSupport(),
913
+                PhpDefaultCharset::class => ['pass' => $phpDefaultCharset->run(), 'description' => $phpDefaultCharset->description(), 'severity' => $phpDefaultCharset->severity()],
914
+                PhpOutputBuffering::class => ['pass' => $phpOutputBuffering->run(), 'description' => $phpOutputBuffering->description(), 'severity' => $phpOutputBuffering->severity()],
915
+                LegacySSEKeyFormat::class => ['pass' => $legacySSEKeyFormat->run(), 'description' => $legacySSEKeyFormat->description(), 'severity' => $legacySSEKeyFormat->severity(), 'linkToDocumentation' => $legacySSEKeyFormat->linkToDocumentation()],
916
+                CheckUserCertificates::class => ['pass' => $checkUserCertificates->run(), 'description' => $checkUserCertificates->description(), 'severity' => $checkUserCertificates->severity(), 'elements' => $checkUserCertificates->elements()],
917
+                'isDefaultPhoneRegionSet' => $this->config->getSystemValueString('default_phone_region', '') !== '',
918
+                SupportedDatabase::class => ['pass' => $supportedDatabases->run(), 'description' => $supportedDatabases->description(), 'severity' => $supportedDatabases->severity()],
919
+                'temporaryDirectoryWritable' => $this->isTemporaryDirectoryWritable(),
920
+                LdapInvalidUuids::class => ['pass' => $ldapInvalidUuids->run(), 'description' => $ldapInvalidUuids->description(), 'severity' => $ldapInvalidUuids->severity()],
921
+            ]
922
+        );
923
+    }
924 924
 }
Please login to merge, or discard this patch.