@@ -6,60 +6,60 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', |
|
| 10 | - 'OCA\\Settings\\Activity\\GroupProvider' => $baseDir . '/../lib/Activity/GroupProvider.php', |
|
| 11 | - 'OCA\\Settings\\Activity\\GroupSetting' => $baseDir . '/../lib/Activity/GroupSetting.php', |
|
| 12 | - 'OCA\\Settings\\Activity\\Provider' => $baseDir . '/../lib/Activity/Provider.php', |
|
| 13 | - 'OCA\\Settings\\Activity\\SecurityFilter' => $baseDir . '/../lib/Activity/SecurityFilter.php', |
|
| 14 | - 'OCA\\Settings\\Activity\\SecurityProvider' => $baseDir . '/../lib/Activity/SecurityProvider.php', |
|
| 15 | - 'OCA\\Settings\\Activity\\SecuritySetting' => $baseDir . '/../lib/Activity/SecuritySetting.php', |
|
| 16 | - 'OCA\\Settings\\Activity\\Setting' => $baseDir . '/../lib/Activity/Setting.php', |
|
| 17 | - 'OCA\\Settings\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
| 18 | - 'OCA\\Settings\\BackgroundJobs\\VerifyUserData' => $baseDir . '/../lib/BackgroundJobs/VerifyUserData.php', |
|
| 19 | - 'OCA\\Settings\\Controller\\AdminSettingsController' => $baseDir . '/../lib/Controller/AdminSettingsController.php', |
|
| 20 | - 'OCA\\Settings\\Controller\\AppSettingsController' => $baseDir . '/../lib/Controller/AppSettingsController.php', |
|
| 21 | - 'OCA\\Settings\\Controller\\AuthSettingsController' => $baseDir . '/../lib/Controller/AuthSettingsController.php', |
|
| 22 | - 'OCA\\Settings\\Controller\\ChangePasswordController' => $baseDir . '/../lib/Controller/ChangePasswordController.php', |
|
| 23 | - 'OCA\\Settings\\Controller\\CheckSetupController' => $baseDir . '/../lib/Controller/CheckSetupController.php', |
|
| 24 | - 'OCA\\Settings\\Controller\\CommonSettingsTrait' => $baseDir . '/../lib/Controller/CommonSettingsTrait.php', |
|
| 25 | - 'OCA\\Settings\\Controller\\HelpController' => $baseDir . '/../lib/Controller/HelpController.php', |
|
| 26 | - 'OCA\\Settings\\Controller\\LogSettingsController' => $baseDir . '/../lib/Controller/LogSettingsController.php', |
|
| 27 | - 'OCA\\Settings\\Controller\\MailSettingsController' => $baseDir . '/../lib/Controller/MailSettingsController.php', |
|
| 28 | - 'OCA\\Settings\\Controller\\PersonalSettingsController' => $baseDir . '/../lib/Controller/PersonalSettingsController.php', |
|
| 29 | - 'OCA\\Settings\\Controller\\ReasonsController' => $baseDir . '/../lib/Controller/ReasonsController.php', |
|
| 30 | - 'OCA\\Settings\\Controller\\TwoFactorSettingsController' => $baseDir . '/../lib/Controller/TwoFactorSettingsController.php', |
|
| 31 | - 'OCA\\Settings\\Controller\\UsersController' => $baseDir . '/../lib/Controller/UsersController.php', |
|
| 32 | - 'OCA\\Settings\\Controller\\WebAuthnController' => $baseDir . '/../lib/Controller/WebAuthnController.php', |
|
| 33 | - 'OCA\\Settings\\Events\\BeforeTemplateRenderedEvent' => $baseDir . '/../lib/Events/BeforeTemplateRenderedEvent.php', |
|
| 34 | - 'OCA\\Settings\\Hooks' => $baseDir . '/../lib/Hooks.php', |
|
| 35 | - 'OCA\\Settings\\Mailer\\NewUserMailHelper' => $baseDir . '/../lib/Mailer/NewUserMailHelper.php', |
|
| 36 | - 'OCA\\Settings\\Middleware\\SubadminMiddleware' => $baseDir . '/../lib/Middleware/SubadminMiddleware.php', |
|
| 37 | - 'OCA\\Settings\\Search\\AppSearch' => $baseDir . '/../lib/Search/AppSearch.php', |
|
| 38 | - 'OCA\\Settings\\Search\\SectionSearch' => $baseDir . '/../lib/Search/SectionSearch.php', |
|
| 39 | - 'OCA\\Settings\\Sections\\Admin\\Additional' => $baseDir . '/../lib/Sections/Admin/Additional.php', |
|
| 40 | - 'OCA\\Settings\\Sections\\Admin\\Groupware' => $baseDir . '/../lib/Sections/Admin/Groupware.php', |
|
| 41 | - 'OCA\\Settings\\Sections\\Admin\\Overview' => $baseDir . '/../lib/Sections/Admin/Overview.php', |
|
| 42 | - 'OCA\\Settings\\Sections\\Admin\\Security' => $baseDir . '/../lib/Sections/Admin/Security.php', |
|
| 43 | - 'OCA\\Settings\\Sections\\Admin\\Server' => $baseDir . '/../lib/Sections/Admin/Server.php', |
|
| 44 | - 'OCA\\Settings\\Sections\\Admin\\Sharing' => $baseDir . '/../lib/Sections/Admin/Sharing.php', |
|
| 45 | - 'OCA\\Settings\\Sections\\Personal\\PersonalInfo' => $baseDir . '/../lib/Sections/Personal/PersonalInfo.php', |
|
| 46 | - 'OCA\\Settings\\Sections\\Personal\\Security' => $baseDir . '/../lib/Sections/Personal/Security.php', |
|
| 47 | - 'OCA\\Settings\\Sections\\Personal\\SyncClients' => $baseDir . '/../lib/Sections/Personal/SyncClients.php', |
|
| 48 | - 'OCA\\Settings\\Settings\\Admin\\Mail' => $baseDir . '/../lib/Settings/Admin/Mail.php', |
|
| 49 | - 'OCA\\Settings\\Settings\\Admin\\Overview' => $baseDir . '/../lib/Settings/Admin/Overview.php', |
|
| 50 | - 'OCA\\Settings\\Settings\\Admin\\Security' => $baseDir . '/../lib/Settings/Admin/Security.php', |
|
| 51 | - 'OCA\\Settings\\Settings\\Admin\\Server' => $baseDir . '/../lib/Settings/Admin/Server.php', |
|
| 52 | - 'OCA\\Settings\\Settings\\Admin\\Sharing' => $baseDir . '/../lib/Settings/Admin/Sharing.php', |
|
| 53 | - 'OCA\\Settings\\Settings\\Personal\\Additional' => $baseDir . '/../lib/Settings/Personal/Additional.php', |
|
| 54 | - 'OCA\\Settings\\Settings\\Personal\\PersonalInfo' => $baseDir . '/../lib/Settings/Personal/PersonalInfo.php', |
|
| 55 | - 'OCA\\Settings\\Settings\\Personal\\Security\\Authtokens' => $baseDir . '/../lib/Settings/Personal/Security/Authtokens.php', |
|
| 56 | - 'OCA\\Settings\\Settings\\Personal\\Security\\Password' => $baseDir . '/../lib/Settings/Personal/Security/Password.php', |
|
| 57 | - 'OCA\\Settings\\Settings\\Personal\\Security\\TwoFactor' => $baseDir . '/../lib/Settings/Personal/Security/TwoFactor.php', |
|
| 58 | - 'OCA\\Settings\\Settings\\Personal\\Security\\WebAuthn' => $baseDir . '/../lib/Settings/Personal/Security/WebAuthn.php', |
|
| 59 | - 'OCA\\Settings\\Settings\\Personal\\ServerDevNotice' => $baseDir . '/../lib/Settings/Personal/ServerDevNotice.php', |
|
| 60 | - 'OCA\\Settings\\SetupChecks\\CheckUserCertificates' => $baseDir . '/../lib/SetupChecks/CheckUserCertificates.php', |
|
| 61 | - 'OCA\\Settings\\SetupChecks\\LegacySSEKeyFormat' => $baseDir . '/../lib/SetupChecks/LegacySSEKeyFormat.php', |
|
| 62 | - 'OCA\\Settings\\SetupChecks\\PhpDefaultCharset' => $baseDir . '/../lib/SetupChecks/PhpDefaultCharset.php', |
|
| 63 | - 'OCA\\Settings\\SetupChecks\\PhpOutputBuffering' => $baseDir . '/../lib/SetupChecks/PhpOutputBuffering.php', |
|
| 64 | - 'OCA\\Settings\\SetupChecks\\SupportedDatabase' => $baseDir . '/../lib/SetupChecks/SupportedDatabase.php', |
|
| 9 | + 'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php', |
|
| 10 | + 'OCA\\Settings\\Activity\\GroupProvider' => $baseDir.'/../lib/Activity/GroupProvider.php', |
|
| 11 | + 'OCA\\Settings\\Activity\\GroupSetting' => $baseDir.'/../lib/Activity/GroupSetting.php', |
|
| 12 | + 'OCA\\Settings\\Activity\\Provider' => $baseDir.'/../lib/Activity/Provider.php', |
|
| 13 | + 'OCA\\Settings\\Activity\\SecurityFilter' => $baseDir.'/../lib/Activity/SecurityFilter.php', |
|
| 14 | + 'OCA\\Settings\\Activity\\SecurityProvider' => $baseDir.'/../lib/Activity/SecurityProvider.php', |
|
| 15 | + 'OCA\\Settings\\Activity\\SecuritySetting' => $baseDir.'/../lib/Activity/SecuritySetting.php', |
|
| 16 | + 'OCA\\Settings\\Activity\\Setting' => $baseDir.'/../lib/Activity/Setting.php', |
|
| 17 | + 'OCA\\Settings\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
| 18 | + 'OCA\\Settings\\BackgroundJobs\\VerifyUserData' => $baseDir.'/../lib/BackgroundJobs/VerifyUserData.php', |
|
| 19 | + 'OCA\\Settings\\Controller\\AdminSettingsController' => $baseDir.'/../lib/Controller/AdminSettingsController.php', |
|
| 20 | + 'OCA\\Settings\\Controller\\AppSettingsController' => $baseDir.'/../lib/Controller/AppSettingsController.php', |
|
| 21 | + 'OCA\\Settings\\Controller\\AuthSettingsController' => $baseDir.'/../lib/Controller/AuthSettingsController.php', |
|
| 22 | + 'OCA\\Settings\\Controller\\ChangePasswordController' => $baseDir.'/../lib/Controller/ChangePasswordController.php', |
|
| 23 | + 'OCA\\Settings\\Controller\\CheckSetupController' => $baseDir.'/../lib/Controller/CheckSetupController.php', |
|
| 24 | + 'OCA\\Settings\\Controller\\CommonSettingsTrait' => $baseDir.'/../lib/Controller/CommonSettingsTrait.php', |
|
| 25 | + 'OCA\\Settings\\Controller\\HelpController' => $baseDir.'/../lib/Controller/HelpController.php', |
|
| 26 | + 'OCA\\Settings\\Controller\\LogSettingsController' => $baseDir.'/../lib/Controller/LogSettingsController.php', |
|
| 27 | + 'OCA\\Settings\\Controller\\MailSettingsController' => $baseDir.'/../lib/Controller/MailSettingsController.php', |
|
| 28 | + 'OCA\\Settings\\Controller\\PersonalSettingsController' => $baseDir.'/../lib/Controller/PersonalSettingsController.php', |
|
| 29 | + 'OCA\\Settings\\Controller\\ReasonsController' => $baseDir.'/../lib/Controller/ReasonsController.php', |
|
| 30 | + 'OCA\\Settings\\Controller\\TwoFactorSettingsController' => $baseDir.'/../lib/Controller/TwoFactorSettingsController.php', |
|
| 31 | + 'OCA\\Settings\\Controller\\UsersController' => $baseDir.'/../lib/Controller/UsersController.php', |
|
| 32 | + 'OCA\\Settings\\Controller\\WebAuthnController' => $baseDir.'/../lib/Controller/WebAuthnController.php', |
|
| 33 | + 'OCA\\Settings\\Events\\BeforeTemplateRenderedEvent' => $baseDir.'/../lib/Events/BeforeTemplateRenderedEvent.php', |
|
| 34 | + 'OCA\\Settings\\Hooks' => $baseDir.'/../lib/Hooks.php', |
|
| 35 | + 'OCA\\Settings\\Mailer\\NewUserMailHelper' => $baseDir.'/../lib/Mailer/NewUserMailHelper.php', |
|
| 36 | + 'OCA\\Settings\\Middleware\\SubadminMiddleware' => $baseDir.'/../lib/Middleware/SubadminMiddleware.php', |
|
| 37 | + 'OCA\\Settings\\Search\\AppSearch' => $baseDir.'/../lib/Search/AppSearch.php', |
|
| 38 | + 'OCA\\Settings\\Search\\SectionSearch' => $baseDir.'/../lib/Search/SectionSearch.php', |
|
| 39 | + 'OCA\\Settings\\Sections\\Admin\\Additional' => $baseDir.'/../lib/Sections/Admin/Additional.php', |
|
| 40 | + 'OCA\\Settings\\Sections\\Admin\\Groupware' => $baseDir.'/../lib/Sections/Admin/Groupware.php', |
|
| 41 | + 'OCA\\Settings\\Sections\\Admin\\Overview' => $baseDir.'/../lib/Sections/Admin/Overview.php', |
|
| 42 | + 'OCA\\Settings\\Sections\\Admin\\Security' => $baseDir.'/../lib/Sections/Admin/Security.php', |
|
| 43 | + 'OCA\\Settings\\Sections\\Admin\\Server' => $baseDir.'/../lib/Sections/Admin/Server.php', |
|
| 44 | + 'OCA\\Settings\\Sections\\Admin\\Sharing' => $baseDir.'/../lib/Sections/Admin/Sharing.php', |
|
| 45 | + 'OCA\\Settings\\Sections\\Personal\\PersonalInfo' => $baseDir.'/../lib/Sections/Personal/PersonalInfo.php', |
|
| 46 | + 'OCA\\Settings\\Sections\\Personal\\Security' => $baseDir.'/../lib/Sections/Personal/Security.php', |
|
| 47 | + 'OCA\\Settings\\Sections\\Personal\\SyncClients' => $baseDir.'/../lib/Sections/Personal/SyncClients.php', |
|
| 48 | + 'OCA\\Settings\\Settings\\Admin\\Mail' => $baseDir.'/../lib/Settings/Admin/Mail.php', |
|
| 49 | + 'OCA\\Settings\\Settings\\Admin\\Overview' => $baseDir.'/../lib/Settings/Admin/Overview.php', |
|
| 50 | + 'OCA\\Settings\\Settings\\Admin\\Security' => $baseDir.'/../lib/Settings/Admin/Security.php', |
|
| 51 | + 'OCA\\Settings\\Settings\\Admin\\Server' => $baseDir.'/../lib/Settings/Admin/Server.php', |
|
| 52 | + 'OCA\\Settings\\Settings\\Admin\\Sharing' => $baseDir.'/../lib/Settings/Admin/Sharing.php', |
|
| 53 | + 'OCA\\Settings\\Settings\\Personal\\Additional' => $baseDir.'/../lib/Settings/Personal/Additional.php', |
|
| 54 | + 'OCA\\Settings\\Settings\\Personal\\PersonalInfo' => $baseDir.'/../lib/Settings/Personal/PersonalInfo.php', |
|
| 55 | + 'OCA\\Settings\\Settings\\Personal\\Security\\Authtokens' => $baseDir.'/../lib/Settings/Personal/Security/Authtokens.php', |
|
| 56 | + 'OCA\\Settings\\Settings\\Personal\\Security\\Password' => $baseDir.'/../lib/Settings/Personal/Security/Password.php', |
|
| 57 | + 'OCA\\Settings\\Settings\\Personal\\Security\\TwoFactor' => $baseDir.'/../lib/Settings/Personal/Security/TwoFactor.php', |
|
| 58 | + 'OCA\\Settings\\Settings\\Personal\\Security\\WebAuthn' => $baseDir.'/../lib/Settings/Personal/Security/WebAuthn.php', |
|
| 59 | + 'OCA\\Settings\\Settings\\Personal\\ServerDevNotice' => $baseDir.'/../lib/Settings/Personal/ServerDevNotice.php', |
|
| 60 | + 'OCA\\Settings\\SetupChecks\\CheckUserCertificates' => $baseDir.'/../lib/SetupChecks/CheckUserCertificates.php', |
|
| 61 | + 'OCA\\Settings\\SetupChecks\\LegacySSEKeyFormat' => $baseDir.'/../lib/SetupChecks/LegacySSEKeyFormat.php', |
|
| 62 | + 'OCA\\Settings\\SetupChecks\\PhpDefaultCharset' => $baseDir.'/../lib/SetupChecks/PhpDefaultCharset.php', |
|
| 63 | + 'OCA\\Settings\\SetupChecks\\PhpOutputBuffering' => $baseDir.'/../lib/SetupChecks/PhpOutputBuffering.php', |
|
| 64 | + 'OCA\\Settings\\SetupChecks\\SupportedDatabase' => $baseDir.'/../lib/SetupChecks/SupportedDatabase.php', |
|
| 65 | 65 | ); |
@@ -6,82 +6,82 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInitSettings |
| 8 | 8 | { |
| 9 | - public static $prefixLengthsPsr4 = array ( |
|
| 9 | + public static $prefixLengthsPsr4 = array( |
|
| 10 | 10 | 'O' => |
| 11 | - array ( |
|
| 11 | + array( |
|
| 12 | 12 | 'OCA\\Settings\\' => 13, |
| 13 | 13 | ), |
| 14 | 14 | ); |
| 15 | 15 | |
| 16 | - public static $prefixDirsPsr4 = array ( |
|
| 16 | + public static $prefixDirsPsr4 = array( |
|
| 17 | 17 | 'OCA\\Settings\\' => |
| 18 | - array ( |
|
| 19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
| 18 | + array( |
|
| 19 | + 0 => __DIR__.'/..'.'/../lib', |
|
| 20 | 20 | ), |
| 21 | 21 | ); |
| 22 | 22 | |
| 23 | - public static $classMap = array ( |
|
| 24 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
| 25 | - 'OCA\\Settings\\Activity\\GroupProvider' => __DIR__ . '/..' . '/../lib/Activity/GroupProvider.php', |
|
| 26 | - 'OCA\\Settings\\Activity\\GroupSetting' => __DIR__ . '/..' . '/../lib/Activity/GroupSetting.php', |
|
| 27 | - 'OCA\\Settings\\Activity\\Provider' => __DIR__ . '/..' . '/../lib/Activity/Provider.php', |
|
| 28 | - 'OCA\\Settings\\Activity\\SecurityFilter' => __DIR__ . '/..' . '/../lib/Activity/SecurityFilter.php', |
|
| 29 | - 'OCA\\Settings\\Activity\\SecurityProvider' => __DIR__ . '/..' . '/../lib/Activity/SecurityProvider.php', |
|
| 30 | - 'OCA\\Settings\\Activity\\SecuritySetting' => __DIR__ . '/..' . '/../lib/Activity/SecuritySetting.php', |
|
| 31 | - 'OCA\\Settings\\Activity\\Setting' => __DIR__ . '/..' . '/../lib/Activity/Setting.php', |
|
| 32 | - 'OCA\\Settings\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
| 33 | - 'OCA\\Settings\\BackgroundJobs\\VerifyUserData' => __DIR__ . '/..' . '/../lib/BackgroundJobs/VerifyUserData.php', |
|
| 34 | - 'OCA\\Settings\\Controller\\AdminSettingsController' => __DIR__ . '/..' . '/../lib/Controller/AdminSettingsController.php', |
|
| 35 | - 'OCA\\Settings\\Controller\\AppSettingsController' => __DIR__ . '/..' . '/../lib/Controller/AppSettingsController.php', |
|
| 36 | - 'OCA\\Settings\\Controller\\AuthSettingsController' => __DIR__ . '/..' . '/../lib/Controller/AuthSettingsController.php', |
|
| 37 | - 'OCA\\Settings\\Controller\\ChangePasswordController' => __DIR__ . '/..' . '/../lib/Controller/ChangePasswordController.php', |
|
| 38 | - 'OCA\\Settings\\Controller\\CheckSetupController' => __DIR__ . '/..' . '/../lib/Controller/CheckSetupController.php', |
|
| 39 | - 'OCA\\Settings\\Controller\\CommonSettingsTrait' => __DIR__ . '/..' . '/../lib/Controller/CommonSettingsTrait.php', |
|
| 40 | - 'OCA\\Settings\\Controller\\HelpController' => __DIR__ . '/..' . '/../lib/Controller/HelpController.php', |
|
| 41 | - 'OCA\\Settings\\Controller\\LogSettingsController' => __DIR__ . '/..' . '/../lib/Controller/LogSettingsController.php', |
|
| 42 | - 'OCA\\Settings\\Controller\\MailSettingsController' => __DIR__ . '/..' . '/../lib/Controller/MailSettingsController.php', |
|
| 43 | - 'OCA\\Settings\\Controller\\PersonalSettingsController' => __DIR__ . '/..' . '/../lib/Controller/PersonalSettingsController.php', |
|
| 44 | - 'OCA\\Settings\\Controller\\ReasonsController' => __DIR__ . '/..' . '/../lib/Controller/ReasonsController.php', |
|
| 45 | - 'OCA\\Settings\\Controller\\TwoFactorSettingsController' => __DIR__ . '/..' . '/../lib/Controller/TwoFactorSettingsController.php', |
|
| 46 | - 'OCA\\Settings\\Controller\\UsersController' => __DIR__ . '/..' . '/../lib/Controller/UsersController.php', |
|
| 47 | - 'OCA\\Settings\\Controller\\WebAuthnController' => __DIR__ . '/..' . '/../lib/Controller/WebAuthnController.php', |
|
| 48 | - 'OCA\\Settings\\Events\\BeforeTemplateRenderedEvent' => __DIR__ . '/..' . '/../lib/Events/BeforeTemplateRenderedEvent.php', |
|
| 49 | - 'OCA\\Settings\\Hooks' => __DIR__ . '/..' . '/../lib/Hooks.php', |
|
| 50 | - 'OCA\\Settings\\Mailer\\NewUserMailHelper' => __DIR__ . '/..' . '/../lib/Mailer/NewUserMailHelper.php', |
|
| 51 | - 'OCA\\Settings\\Middleware\\SubadminMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/SubadminMiddleware.php', |
|
| 52 | - 'OCA\\Settings\\Search\\AppSearch' => __DIR__ . '/..' . '/../lib/Search/AppSearch.php', |
|
| 53 | - 'OCA\\Settings\\Search\\SectionSearch' => __DIR__ . '/..' . '/../lib/Search/SectionSearch.php', |
|
| 54 | - 'OCA\\Settings\\Sections\\Admin\\Additional' => __DIR__ . '/..' . '/../lib/Sections/Admin/Additional.php', |
|
| 55 | - 'OCA\\Settings\\Sections\\Admin\\Groupware' => __DIR__ . '/..' . '/../lib/Sections/Admin/Groupware.php', |
|
| 56 | - 'OCA\\Settings\\Sections\\Admin\\Overview' => __DIR__ . '/..' . '/../lib/Sections/Admin/Overview.php', |
|
| 57 | - 'OCA\\Settings\\Sections\\Admin\\Security' => __DIR__ . '/..' . '/../lib/Sections/Admin/Security.php', |
|
| 58 | - 'OCA\\Settings\\Sections\\Admin\\Server' => __DIR__ . '/..' . '/../lib/Sections/Admin/Server.php', |
|
| 59 | - 'OCA\\Settings\\Sections\\Admin\\Sharing' => __DIR__ . '/..' . '/../lib/Sections/Admin/Sharing.php', |
|
| 60 | - 'OCA\\Settings\\Sections\\Personal\\PersonalInfo' => __DIR__ . '/..' . '/../lib/Sections/Personal/PersonalInfo.php', |
|
| 61 | - 'OCA\\Settings\\Sections\\Personal\\Security' => __DIR__ . '/..' . '/../lib/Sections/Personal/Security.php', |
|
| 62 | - 'OCA\\Settings\\Sections\\Personal\\SyncClients' => __DIR__ . '/..' . '/../lib/Sections/Personal/SyncClients.php', |
|
| 63 | - 'OCA\\Settings\\Settings\\Admin\\Mail' => __DIR__ . '/..' . '/../lib/Settings/Admin/Mail.php', |
|
| 64 | - 'OCA\\Settings\\Settings\\Admin\\Overview' => __DIR__ . '/..' . '/../lib/Settings/Admin/Overview.php', |
|
| 65 | - 'OCA\\Settings\\Settings\\Admin\\Security' => __DIR__ . '/..' . '/../lib/Settings/Admin/Security.php', |
|
| 66 | - 'OCA\\Settings\\Settings\\Admin\\Server' => __DIR__ . '/..' . '/../lib/Settings/Admin/Server.php', |
|
| 67 | - 'OCA\\Settings\\Settings\\Admin\\Sharing' => __DIR__ . '/..' . '/../lib/Settings/Admin/Sharing.php', |
|
| 68 | - 'OCA\\Settings\\Settings\\Personal\\Additional' => __DIR__ . '/..' . '/../lib/Settings/Personal/Additional.php', |
|
| 69 | - 'OCA\\Settings\\Settings\\Personal\\PersonalInfo' => __DIR__ . '/..' . '/../lib/Settings/Personal/PersonalInfo.php', |
|
| 70 | - 'OCA\\Settings\\Settings\\Personal\\Security\\Authtokens' => __DIR__ . '/..' . '/../lib/Settings/Personal/Security/Authtokens.php', |
|
| 71 | - 'OCA\\Settings\\Settings\\Personal\\Security\\Password' => __DIR__ . '/..' . '/../lib/Settings/Personal/Security/Password.php', |
|
| 72 | - 'OCA\\Settings\\Settings\\Personal\\Security\\TwoFactor' => __DIR__ . '/..' . '/../lib/Settings/Personal/Security/TwoFactor.php', |
|
| 73 | - 'OCA\\Settings\\Settings\\Personal\\Security\\WebAuthn' => __DIR__ . '/..' . '/../lib/Settings/Personal/Security/WebAuthn.php', |
|
| 74 | - 'OCA\\Settings\\Settings\\Personal\\ServerDevNotice' => __DIR__ . '/..' . '/../lib/Settings/Personal/ServerDevNotice.php', |
|
| 75 | - 'OCA\\Settings\\SetupChecks\\CheckUserCertificates' => __DIR__ . '/..' . '/../lib/SetupChecks/CheckUserCertificates.php', |
|
| 76 | - 'OCA\\Settings\\SetupChecks\\LegacySSEKeyFormat' => __DIR__ . '/..' . '/../lib/SetupChecks/LegacySSEKeyFormat.php', |
|
| 77 | - 'OCA\\Settings\\SetupChecks\\PhpDefaultCharset' => __DIR__ . '/..' . '/../lib/SetupChecks/PhpDefaultCharset.php', |
|
| 78 | - 'OCA\\Settings\\SetupChecks\\PhpOutputBuffering' => __DIR__ . '/..' . '/../lib/SetupChecks/PhpOutputBuffering.php', |
|
| 79 | - 'OCA\\Settings\\SetupChecks\\SupportedDatabase' => __DIR__ . '/..' . '/../lib/SetupChecks/SupportedDatabase.php', |
|
| 23 | + public static $classMap = array( |
|
| 24 | + 'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php', |
|
| 25 | + 'OCA\\Settings\\Activity\\GroupProvider' => __DIR__.'/..'.'/../lib/Activity/GroupProvider.php', |
|
| 26 | + 'OCA\\Settings\\Activity\\GroupSetting' => __DIR__.'/..'.'/../lib/Activity/GroupSetting.php', |
|
| 27 | + 'OCA\\Settings\\Activity\\Provider' => __DIR__.'/..'.'/../lib/Activity/Provider.php', |
|
| 28 | + 'OCA\\Settings\\Activity\\SecurityFilter' => __DIR__.'/..'.'/../lib/Activity/SecurityFilter.php', |
|
| 29 | + 'OCA\\Settings\\Activity\\SecurityProvider' => __DIR__.'/..'.'/../lib/Activity/SecurityProvider.php', |
|
| 30 | + 'OCA\\Settings\\Activity\\SecuritySetting' => __DIR__.'/..'.'/../lib/Activity/SecuritySetting.php', |
|
| 31 | + 'OCA\\Settings\\Activity\\Setting' => __DIR__.'/..'.'/../lib/Activity/Setting.php', |
|
| 32 | + 'OCA\\Settings\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
| 33 | + 'OCA\\Settings\\BackgroundJobs\\VerifyUserData' => __DIR__.'/..'.'/../lib/BackgroundJobs/VerifyUserData.php', |
|
| 34 | + 'OCA\\Settings\\Controller\\AdminSettingsController' => __DIR__.'/..'.'/../lib/Controller/AdminSettingsController.php', |
|
| 35 | + 'OCA\\Settings\\Controller\\AppSettingsController' => __DIR__.'/..'.'/../lib/Controller/AppSettingsController.php', |
|
| 36 | + 'OCA\\Settings\\Controller\\AuthSettingsController' => __DIR__.'/..'.'/../lib/Controller/AuthSettingsController.php', |
|
| 37 | + 'OCA\\Settings\\Controller\\ChangePasswordController' => __DIR__.'/..'.'/../lib/Controller/ChangePasswordController.php', |
|
| 38 | + 'OCA\\Settings\\Controller\\CheckSetupController' => __DIR__.'/..'.'/../lib/Controller/CheckSetupController.php', |
|
| 39 | + 'OCA\\Settings\\Controller\\CommonSettingsTrait' => __DIR__.'/..'.'/../lib/Controller/CommonSettingsTrait.php', |
|
| 40 | + 'OCA\\Settings\\Controller\\HelpController' => __DIR__.'/..'.'/../lib/Controller/HelpController.php', |
|
| 41 | + 'OCA\\Settings\\Controller\\LogSettingsController' => __DIR__.'/..'.'/../lib/Controller/LogSettingsController.php', |
|
| 42 | + 'OCA\\Settings\\Controller\\MailSettingsController' => __DIR__.'/..'.'/../lib/Controller/MailSettingsController.php', |
|
| 43 | + 'OCA\\Settings\\Controller\\PersonalSettingsController' => __DIR__.'/..'.'/../lib/Controller/PersonalSettingsController.php', |
|
| 44 | + 'OCA\\Settings\\Controller\\ReasonsController' => __DIR__.'/..'.'/../lib/Controller/ReasonsController.php', |
|
| 45 | + 'OCA\\Settings\\Controller\\TwoFactorSettingsController' => __DIR__.'/..'.'/../lib/Controller/TwoFactorSettingsController.php', |
|
| 46 | + 'OCA\\Settings\\Controller\\UsersController' => __DIR__.'/..'.'/../lib/Controller/UsersController.php', |
|
| 47 | + 'OCA\\Settings\\Controller\\WebAuthnController' => __DIR__.'/..'.'/../lib/Controller/WebAuthnController.php', |
|
| 48 | + 'OCA\\Settings\\Events\\BeforeTemplateRenderedEvent' => __DIR__.'/..'.'/../lib/Events/BeforeTemplateRenderedEvent.php', |
|
| 49 | + 'OCA\\Settings\\Hooks' => __DIR__.'/..'.'/../lib/Hooks.php', |
|
| 50 | + 'OCA\\Settings\\Mailer\\NewUserMailHelper' => __DIR__.'/..'.'/../lib/Mailer/NewUserMailHelper.php', |
|
| 51 | + 'OCA\\Settings\\Middleware\\SubadminMiddleware' => __DIR__.'/..'.'/../lib/Middleware/SubadminMiddleware.php', |
|
| 52 | + 'OCA\\Settings\\Search\\AppSearch' => __DIR__.'/..'.'/../lib/Search/AppSearch.php', |
|
| 53 | + 'OCA\\Settings\\Search\\SectionSearch' => __DIR__.'/..'.'/../lib/Search/SectionSearch.php', |
|
| 54 | + 'OCA\\Settings\\Sections\\Admin\\Additional' => __DIR__.'/..'.'/../lib/Sections/Admin/Additional.php', |
|
| 55 | + 'OCA\\Settings\\Sections\\Admin\\Groupware' => __DIR__.'/..'.'/../lib/Sections/Admin/Groupware.php', |
|
| 56 | + 'OCA\\Settings\\Sections\\Admin\\Overview' => __DIR__.'/..'.'/../lib/Sections/Admin/Overview.php', |
|
| 57 | + 'OCA\\Settings\\Sections\\Admin\\Security' => __DIR__.'/..'.'/../lib/Sections/Admin/Security.php', |
|
| 58 | + 'OCA\\Settings\\Sections\\Admin\\Server' => __DIR__.'/..'.'/../lib/Sections/Admin/Server.php', |
|
| 59 | + 'OCA\\Settings\\Sections\\Admin\\Sharing' => __DIR__.'/..'.'/../lib/Sections/Admin/Sharing.php', |
|
| 60 | + 'OCA\\Settings\\Sections\\Personal\\PersonalInfo' => __DIR__.'/..'.'/../lib/Sections/Personal/PersonalInfo.php', |
|
| 61 | + 'OCA\\Settings\\Sections\\Personal\\Security' => __DIR__.'/..'.'/../lib/Sections/Personal/Security.php', |
|
| 62 | + 'OCA\\Settings\\Sections\\Personal\\SyncClients' => __DIR__.'/..'.'/../lib/Sections/Personal/SyncClients.php', |
|
| 63 | + 'OCA\\Settings\\Settings\\Admin\\Mail' => __DIR__.'/..'.'/../lib/Settings/Admin/Mail.php', |
|
| 64 | + 'OCA\\Settings\\Settings\\Admin\\Overview' => __DIR__.'/..'.'/../lib/Settings/Admin/Overview.php', |
|
| 65 | + 'OCA\\Settings\\Settings\\Admin\\Security' => __DIR__.'/..'.'/../lib/Settings/Admin/Security.php', |
|
| 66 | + 'OCA\\Settings\\Settings\\Admin\\Server' => __DIR__.'/..'.'/../lib/Settings/Admin/Server.php', |
|
| 67 | + 'OCA\\Settings\\Settings\\Admin\\Sharing' => __DIR__.'/..'.'/../lib/Settings/Admin/Sharing.php', |
|
| 68 | + 'OCA\\Settings\\Settings\\Personal\\Additional' => __DIR__.'/..'.'/../lib/Settings/Personal/Additional.php', |
|
| 69 | + 'OCA\\Settings\\Settings\\Personal\\PersonalInfo' => __DIR__.'/..'.'/../lib/Settings/Personal/PersonalInfo.php', |
|
| 70 | + 'OCA\\Settings\\Settings\\Personal\\Security\\Authtokens' => __DIR__.'/..'.'/../lib/Settings/Personal/Security/Authtokens.php', |
|
| 71 | + 'OCA\\Settings\\Settings\\Personal\\Security\\Password' => __DIR__.'/..'.'/../lib/Settings/Personal/Security/Password.php', |
|
| 72 | + 'OCA\\Settings\\Settings\\Personal\\Security\\TwoFactor' => __DIR__.'/..'.'/../lib/Settings/Personal/Security/TwoFactor.php', |
|
| 73 | + 'OCA\\Settings\\Settings\\Personal\\Security\\WebAuthn' => __DIR__.'/..'.'/../lib/Settings/Personal/Security/WebAuthn.php', |
|
| 74 | + 'OCA\\Settings\\Settings\\Personal\\ServerDevNotice' => __DIR__.'/..'.'/../lib/Settings/Personal/ServerDevNotice.php', |
|
| 75 | + 'OCA\\Settings\\SetupChecks\\CheckUserCertificates' => __DIR__.'/..'.'/../lib/SetupChecks/CheckUserCertificates.php', |
|
| 76 | + 'OCA\\Settings\\SetupChecks\\LegacySSEKeyFormat' => __DIR__.'/..'.'/../lib/SetupChecks/LegacySSEKeyFormat.php', |
|
| 77 | + 'OCA\\Settings\\SetupChecks\\PhpDefaultCharset' => __DIR__.'/..'.'/../lib/SetupChecks/PhpDefaultCharset.php', |
|
| 78 | + 'OCA\\Settings\\SetupChecks\\PhpOutputBuffering' => __DIR__.'/..'.'/../lib/SetupChecks/PhpOutputBuffering.php', |
|
| 79 | + 'OCA\\Settings\\SetupChecks\\SupportedDatabase' => __DIR__.'/..'.'/../lib/SetupChecks/SupportedDatabase.php', |
|
| 80 | 80 | ); |
| 81 | 81 | |
| 82 | 82 | public static function getInitializer(ClassLoader $loader) |
| 83 | 83 | { |
| 84 | - return \Closure::bind(function () use ($loader) { |
|
| 84 | + return \Closure::bind(function() use ($loader) { |
|
| 85 | 85 | $loader->prefixLengthsPsr4 = ComposerStaticInitSettings::$prefixLengthsPsr4; |
| 86 | 86 | $loader->prefixDirsPsr4 = ComposerStaticInitSettings::$prefixDirsPsr4; |
| 87 | 87 | $loader->classMap = ComposerStaticInitSettings::$classMap; |
@@ -82,299 +82,299 @@ discard block |
||
| 82 | 82 | use Symfony\Component\EventDispatcher\GenericEvent; |
| 83 | 83 | |
| 84 | 84 | class CheckSetupController extends Controller { |
| 85 | - /** @var IConfig */ |
|
| 86 | - private $config; |
|
| 87 | - /** @var IClientService */ |
|
| 88 | - private $clientService; |
|
| 89 | - /** @var IURLGenerator */ |
|
| 90 | - private $urlGenerator; |
|
| 91 | - /** @var IL10N */ |
|
| 92 | - private $l10n; |
|
| 93 | - /** @var Checker */ |
|
| 94 | - private $checker; |
|
| 95 | - /** @var ILogger */ |
|
| 96 | - private $logger; |
|
| 97 | - /** @var EventDispatcherInterface */ |
|
| 98 | - private $dispatcher; |
|
| 99 | - /** @var Connection */ |
|
| 100 | - private $db; |
|
| 101 | - /** @var ILockingProvider */ |
|
| 102 | - private $lockingProvider; |
|
| 103 | - /** @var IDateTimeFormatter */ |
|
| 104 | - private $dateTimeFormatter; |
|
| 105 | - /** @var MemoryInfo */ |
|
| 106 | - private $memoryInfo; |
|
| 107 | - /** @var ISecureRandom */ |
|
| 108 | - private $secureRandom; |
|
| 109 | - /** @var IniGetWrapper */ |
|
| 110 | - private $iniGetWrapper; |
|
| 111 | - /** @var IDBConnection */ |
|
| 112 | - private $connection; |
|
| 113 | - |
|
| 114 | - public function __construct($AppName, |
|
| 115 | - IRequest $request, |
|
| 116 | - IConfig $config, |
|
| 117 | - IClientService $clientService, |
|
| 118 | - IURLGenerator $urlGenerator, |
|
| 119 | - IL10N $l10n, |
|
| 120 | - Checker $checker, |
|
| 121 | - ILogger $logger, |
|
| 122 | - EventDispatcherInterface $dispatcher, |
|
| 123 | - Connection $db, |
|
| 124 | - ILockingProvider $lockingProvider, |
|
| 125 | - IDateTimeFormatter $dateTimeFormatter, |
|
| 126 | - MemoryInfo $memoryInfo, |
|
| 127 | - ISecureRandom $secureRandom, |
|
| 128 | - IniGetWrapper $iniGetWrapper, |
|
| 129 | - IDBConnection $connection) { |
|
| 130 | - parent::__construct($AppName, $request); |
|
| 131 | - $this->config = $config; |
|
| 132 | - $this->clientService = $clientService; |
|
| 133 | - $this->urlGenerator = $urlGenerator; |
|
| 134 | - $this->l10n = $l10n; |
|
| 135 | - $this->checker = $checker; |
|
| 136 | - $this->logger = $logger; |
|
| 137 | - $this->dispatcher = $dispatcher; |
|
| 138 | - $this->db = $db; |
|
| 139 | - $this->lockingProvider = $lockingProvider; |
|
| 140 | - $this->dateTimeFormatter = $dateTimeFormatter; |
|
| 141 | - $this->memoryInfo = $memoryInfo; |
|
| 142 | - $this->secureRandom = $secureRandom; |
|
| 143 | - $this->iniGetWrapper = $iniGetWrapper; |
|
| 144 | - $this->connection = $connection; |
|
| 145 | - } |
|
| 146 | - |
|
| 147 | - /** |
|
| 148 | - * Checks if the server can connect to the internet using HTTPS and HTTP |
|
| 149 | - * @return bool |
|
| 150 | - */ |
|
| 151 | - private function hasInternetConnectivityProblems(): bool { |
|
| 152 | - if ($this->config->getSystemValue('has_internet_connection', true) === false) { |
|
| 153 | - return false; |
|
| 154 | - } |
|
| 155 | - |
|
| 156 | - $siteArray = $this->config->getSystemValue('connectivity_check_domains', [ |
|
| 157 | - 'www.nextcloud.com', 'www.startpage.com', 'www.eff.org', 'www.edri.org' |
|
| 158 | - ]); |
|
| 159 | - |
|
| 160 | - foreach ($siteArray as $site) { |
|
| 161 | - if ($this->isSiteReachable($site)) { |
|
| 162 | - return false; |
|
| 163 | - } |
|
| 164 | - } |
|
| 165 | - return true; |
|
| 166 | - } |
|
| 167 | - |
|
| 168 | - /** |
|
| 169 | - * Checks if the Nextcloud server can connect to a specific URL using both HTTPS and HTTP |
|
| 170 | - * @return bool |
|
| 171 | - */ |
|
| 172 | - private function isSiteReachable($sitename) { |
|
| 173 | - $httpSiteName = 'http://' . $sitename . '/'; |
|
| 174 | - $httpsSiteName = 'https://' . $sitename . '/'; |
|
| 175 | - |
|
| 176 | - try { |
|
| 177 | - $client = $this->clientService->newClient(); |
|
| 178 | - $client->get($httpSiteName); |
|
| 179 | - $client->get($httpsSiteName); |
|
| 180 | - } catch (\Exception $e) { |
|
| 181 | - $this->logger->logException($e, ['app' => 'internet_connection_check']); |
|
| 182 | - return false; |
|
| 183 | - } |
|
| 184 | - return true; |
|
| 185 | - } |
|
| 186 | - |
|
| 187 | - /** |
|
| 188 | - * Checks whether a local memcache is installed or not |
|
| 189 | - * @return bool |
|
| 190 | - */ |
|
| 191 | - private function isMemcacheConfigured() { |
|
| 192 | - return $this->config->getSystemValue('memcache.local', null) !== null; |
|
| 193 | - } |
|
| 194 | - |
|
| 195 | - /** |
|
| 196 | - * Whether PHP can generate "secure" pseudorandom integers |
|
| 197 | - * |
|
| 198 | - * @return bool |
|
| 199 | - */ |
|
| 200 | - private function isRandomnessSecure() { |
|
| 201 | - try { |
|
| 202 | - $this->secureRandom->generate(1); |
|
| 203 | - } catch (\Exception $ex) { |
|
| 204 | - return false; |
|
| 205 | - } |
|
| 206 | - return true; |
|
| 207 | - } |
|
| 208 | - |
|
| 209 | - /** |
|
| 210 | - * Public for the sake of unit-testing |
|
| 211 | - * |
|
| 212 | - * @return array |
|
| 213 | - */ |
|
| 214 | - protected function getCurlVersion() { |
|
| 215 | - return curl_version(); |
|
| 216 | - } |
|
| 217 | - |
|
| 218 | - /** |
|
| 219 | - * Check if the used SSL lib is outdated. Older OpenSSL and NSS versions do |
|
| 220 | - * have multiple bugs which likely lead to problems in combination with |
|
| 221 | - * functionality required by ownCloud such as SNI. |
|
| 222 | - * |
|
| 223 | - * @link https://github.com/owncloud/core/issues/17446#issuecomment-122877546 |
|
| 224 | - * @link https://bugzilla.redhat.com/show_bug.cgi?id=1241172 |
|
| 225 | - * @return string |
|
| 226 | - */ |
|
| 227 | - private function isUsedTlsLibOutdated() { |
|
| 228 | - // Don't run check when: |
|
| 229 | - // 1. Server has `has_internet_connection` set to false |
|
| 230 | - // 2. AppStore AND S2S is disabled |
|
| 231 | - if (!$this->config->getSystemValue('has_internet_connection', true)) { |
|
| 232 | - return ''; |
|
| 233 | - } |
|
| 234 | - if (!$this->config->getSystemValue('appstoreenabled', true) |
|
| 235 | - && $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'no' |
|
| 236 | - && $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'no') { |
|
| 237 | - return ''; |
|
| 238 | - } |
|
| 239 | - |
|
| 240 | - $versionString = $this->getCurlVersion(); |
|
| 241 | - if (isset($versionString['ssl_version'])) { |
|
| 242 | - $versionString = $versionString['ssl_version']; |
|
| 243 | - } else { |
|
| 244 | - return ''; |
|
| 245 | - } |
|
| 246 | - |
|
| 247 | - $features = $this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing'); |
|
| 248 | - if (!$this->config->getSystemValue('appstoreenabled', true)) { |
|
| 249 | - $features = $this->l10n->t('Federated Cloud Sharing'); |
|
| 250 | - } |
|
| 251 | - |
|
| 252 | - // Check if at least OpenSSL after 1.01d or 1.0.2b |
|
| 253 | - if (strpos($versionString, 'OpenSSL/') === 0) { |
|
| 254 | - $majorVersion = substr($versionString, 8, 5); |
|
| 255 | - $patchRelease = substr($versionString, 13, 6); |
|
| 256 | - |
|
| 257 | - if (($majorVersion === '1.0.1' && ord($patchRelease) < ord('d')) || |
|
| 258 | - ($majorVersion === '1.0.2' && ord($patchRelease) < ord('b'))) { |
|
| 259 | - 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]); |
|
| 260 | - } |
|
| 261 | - } |
|
| 262 | - |
|
| 263 | - // Check if NSS and perform heuristic check |
|
| 264 | - if (strpos($versionString, 'NSS/') === 0) { |
|
| 265 | - try { |
|
| 266 | - $firstClient = $this->clientService->newClient(); |
|
| 267 | - $firstClient->get('https://nextcloud.com/'); |
|
| 268 | - |
|
| 269 | - $secondClient = $this->clientService->newClient(); |
|
| 270 | - $secondClient->get('https://nextcloud.com/'); |
|
| 271 | - } catch (ClientException $e) { |
|
| 272 | - if ($e->getResponse()->getStatusCode() === 400) { |
|
| 273 | - 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]); |
|
| 274 | - } |
|
| 275 | - } catch (\Exception $e) { |
|
| 276 | - $this->logger->logException($e, ['app' => 'settings', 'level' => \OCP\ILogger::WARN]); |
|
| 277 | - 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.'); |
|
| 278 | - } |
|
| 279 | - } |
|
| 280 | - |
|
| 281 | - return ''; |
|
| 282 | - } |
|
| 283 | - |
|
| 284 | - /** |
|
| 285 | - * Whether the version is outdated |
|
| 286 | - * |
|
| 287 | - * @return bool |
|
| 288 | - */ |
|
| 289 | - protected function isPhpOutdated(): bool { |
|
| 290 | - return PHP_VERSION_ID < 70300; |
|
| 291 | - } |
|
| 292 | - |
|
| 293 | - /** |
|
| 294 | - * Whether the php version is still supported (at time of release) |
|
| 295 | - * according to: https://www.php.net/supported-versions.php |
|
| 296 | - * |
|
| 297 | - * @return array |
|
| 298 | - */ |
|
| 299 | - private function isPhpSupported(): array { |
|
| 300 | - return ['eol' => $this->isPhpOutdated(), 'version' => PHP_VERSION]; |
|
| 301 | - } |
|
| 302 | - |
|
| 303 | - /** |
|
| 304 | - * Check if the reverse proxy configuration is working as expected |
|
| 305 | - * |
|
| 306 | - * @return bool |
|
| 307 | - */ |
|
| 308 | - private function forwardedForHeadersWorking() { |
|
| 309 | - $trustedProxies = $this->config->getSystemValue('trusted_proxies', []); |
|
| 310 | - $remoteAddress = $this->request->getHeader('REMOTE_ADDR'); |
|
| 311 | - |
|
| 312 | - if (empty($trustedProxies) && $this->request->getHeader('X-Forwarded-Host') !== '') { |
|
| 313 | - return false; |
|
| 314 | - } |
|
| 315 | - |
|
| 316 | - if (\is_array($trustedProxies) && \in_array($remoteAddress, $trustedProxies, true)) { |
|
| 317 | - return $remoteAddress !== $this->request->getRemoteAddress(); |
|
| 318 | - } |
|
| 319 | - |
|
| 320 | - // either not enabled or working correctly |
|
| 321 | - return true; |
|
| 322 | - } |
|
| 323 | - |
|
| 324 | - /** |
|
| 325 | - * Checks if the correct memcache module for PHP is installed. Only |
|
| 326 | - * fails if memcached is configured and the working module is not installed. |
|
| 327 | - * |
|
| 328 | - * @return bool |
|
| 329 | - */ |
|
| 330 | - private function isCorrectMemcachedPHPModuleInstalled() { |
|
| 331 | - if ($this->config->getSystemValue('memcache.distributed', null) !== '\OC\Memcache\Memcached') { |
|
| 332 | - return true; |
|
| 333 | - } |
|
| 334 | - |
|
| 335 | - // there are two different memcached modules for PHP |
|
| 336 | - // we only support memcached and not memcache |
|
| 337 | - // https://code.google.com/p/memcached/wiki/PHPClientComparison |
|
| 338 | - return !(!extension_loaded('memcached') && extension_loaded('memcache')); |
|
| 339 | - } |
|
| 340 | - |
|
| 341 | - /** |
|
| 342 | - * Checks if set_time_limit is not disabled. |
|
| 343 | - * |
|
| 344 | - * @return bool |
|
| 345 | - */ |
|
| 346 | - private function isSettimelimitAvailable() { |
|
| 347 | - if (function_exists('set_time_limit') |
|
| 348 | - && strpos(@ini_get('disable_functions'), 'set_time_limit') === false) { |
|
| 349 | - return true; |
|
| 350 | - } |
|
| 351 | - |
|
| 352 | - return false; |
|
| 353 | - } |
|
| 354 | - |
|
| 355 | - /** |
|
| 356 | - * @return RedirectResponse |
|
| 357 | - */ |
|
| 358 | - public function rescanFailedIntegrityCheck() { |
|
| 359 | - $this->checker->runInstanceVerification(); |
|
| 360 | - return new RedirectResponse( |
|
| 361 | - $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'overview']) |
|
| 362 | - ); |
|
| 363 | - } |
|
| 364 | - |
|
| 365 | - /** |
|
| 366 | - * @NoCSRFRequired |
|
| 367 | - * @return DataResponse |
|
| 368 | - */ |
|
| 369 | - public function getFailedIntegrityCheckFiles() { |
|
| 370 | - if (!$this->checker->isCodeCheckEnforced()) { |
|
| 371 | - return new DataDisplayResponse('Integrity checker has been disabled. Integrity cannot be verified.'); |
|
| 372 | - } |
|
| 373 | - |
|
| 374 | - $completeResults = $this->checker->getResults(); |
|
| 375 | - |
|
| 376 | - if (!empty($completeResults)) { |
|
| 377 | - $formattedTextResponse = 'Technical information |
|
| 85 | + /** @var IConfig */ |
|
| 86 | + private $config; |
|
| 87 | + /** @var IClientService */ |
|
| 88 | + private $clientService; |
|
| 89 | + /** @var IURLGenerator */ |
|
| 90 | + private $urlGenerator; |
|
| 91 | + /** @var IL10N */ |
|
| 92 | + private $l10n; |
|
| 93 | + /** @var Checker */ |
|
| 94 | + private $checker; |
|
| 95 | + /** @var ILogger */ |
|
| 96 | + private $logger; |
|
| 97 | + /** @var EventDispatcherInterface */ |
|
| 98 | + private $dispatcher; |
|
| 99 | + /** @var Connection */ |
|
| 100 | + private $db; |
|
| 101 | + /** @var ILockingProvider */ |
|
| 102 | + private $lockingProvider; |
|
| 103 | + /** @var IDateTimeFormatter */ |
|
| 104 | + private $dateTimeFormatter; |
|
| 105 | + /** @var MemoryInfo */ |
|
| 106 | + private $memoryInfo; |
|
| 107 | + /** @var ISecureRandom */ |
|
| 108 | + private $secureRandom; |
|
| 109 | + /** @var IniGetWrapper */ |
|
| 110 | + private $iniGetWrapper; |
|
| 111 | + /** @var IDBConnection */ |
|
| 112 | + private $connection; |
|
| 113 | + |
|
| 114 | + public function __construct($AppName, |
|
| 115 | + IRequest $request, |
|
| 116 | + IConfig $config, |
|
| 117 | + IClientService $clientService, |
|
| 118 | + IURLGenerator $urlGenerator, |
|
| 119 | + IL10N $l10n, |
|
| 120 | + Checker $checker, |
|
| 121 | + ILogger $logger, |
|
| 122 | + EventDispatcherInterface $dispatcher, |
|
| 123 | + Connection $db, |
|
| 124 | + ILockingProvider $lockingProvider, |
|
| 125 | + IDateTimeFormatter $dateTimeFormatter, |
|
| 126 | + MemoryInfo $memoryInfo, |
|
| 127 | + ISecureRandom $secureRandom, |
|
| 128 | + IniGetWrapper $iniGetWrapper, |
|
| 129 | + IDBConnection $connection) { |
|
| 130 | + parent::__construct($AppName, $request); |
|
| 131 | + $this->config = $config; |
|
| 132 | + $this->clientService = $clientService; |
|
| 133 | + $this->urlGenerator = $urlGenerator; |
|
| 134 | + $this->l10n = $l10n; |
|
| 135 | + $this->checker = $checker; |
|
| 136 | + $this->logger = $logger; |
|
| 137 | + $this->dispatcher = $dispatcher; |
|
| 138 | + $this->db = $db; |
|
| 139 | + $this->lockingProvider = $lockingProvider; |
|
| 140 | + $this->dateTimeFormatter = $dateTimeFormatter; |
|
| 141 | + $this->memoryInfo = $memoryInfo; |
|
| 142 | + $this->secureRandom = $secureRandom; |
|
| 143 | + $this->iniGetWrapper = $iniGetWrapper; |
|
| 144 | + $this->connection = $connection; |
|
| 145 | + } |
|
| 146 | + |
|
| 147 | + /** |
|
| 148 | + * Checks if the server can connect to the internet using HTTPS and HTTP |
|
| 149 | + * @return bool |
|
| 150 | + */ |
|
| 151 | + private function hasInternetConnectivityProblems(): bool { |
|
| 152 | + if ($this->config->getSystemValue('has_internet_connection', true) === false) { |
|
| 153 | + return false; |
|
| 154 | + } |
|
| 155 | + |
|
| 156 | + $siteArray = $this->config->getSystemValue('connectivity_check_domains', [ |
|
| 157 | + 'www.nextcloud.com', 'www.startpage.com', 'www.eff.org', 'www.edri.org' |
|
| 158 | + ]); |
|
| 159 | + |
|
| 160 | + foreach ($siteArray as $site) { |
|
| 161 | + if ($this->isSiteReachable($site)) { |
|
| 162 | + return false; |
|
| 163 | + } |
|
| 164 | + } |
|
| 165 | + return true; |
|
| 166 | + } |
|
| 167 | + |
|
| 168 | + /** |
|
| 169 | + * Checks if the Nextcloud server can connect to a specific URL using both HTTPS and HTTP |
|
| 170 | + * @return bool |
|
| 171 | + */ |
|
| 172 | + private function isSiteReachable($sitename) { |
|
| 173 | + $httpSiteName = 'http://' . $sitename . '/'; |
|
| 174 | + $httpsSiteName = 'https://' . $sitename . '/'; |
|
| 175 | + |
|
| 176 | + try { |
|
| 177 | + $client = $this->clientService->newClient(); |
|
| 178 | + $client->get($httpSiteName); |
|
| 179 | + $client->get($httpsSiteName); |
|
| 180 | + } catch (\Exception $e) { |
|
| 181 | + $this->logger->logException($e, ['app' => 'internet_connection_check']); |
|
| 182 | + return false; |
|
| 183 | + } |
|
| 184 | + return true; |
|
| 185 | + } |
|
| 186 | + |
|
| 187 | + /** |
|
| 188 | + * Checks whether a local memcache is installed or not |
|
| 189 | + * @return bool |
|
| 190 | + */ |
|
| 191 | + private function isMemcacheConfigured() { |
|
| 192 | + return $this->config->getSystemValue('memcache.local', null) !== null; |
|
| 193 | + } |
|
| 194 | + |
|
| 195 | + /** |
|
| 196 | + * Whether PHP can generate "secure" pseudorandom integers |
|
| 197 | + * |
|
| 198 | + * @return bool |
|
| 199 | + */ |
|
| 200 | + private function isRandomnessSecure() { |
|
| 201 | + try { |
|
| 202 | + $this->secureRandom->generate(1); |
|
| 203 | + } catch (\Exception $ex) { |
|
| 204 | + return false; |
|
| 205 | + } |
|
| 206 | + return true; |
|
| 207 | + } |
|
| 208 | + |
|
| 209 | + /** |
|
| 210 | + * Public for the sake of unit-testing |
|
| 211 | + * |
|
| 212 | + * @return array |
|
| 213 | + */ |
|
| 214 | + protected function getCurlVersion() { |
|
| 215 | + return curl_version(); |
|
| 216 | + } |
|
| 217 | + |
|
| 218 | + /** |
|
| 219 | + * Check if the used SSL lib is outdated. Older OpenSSL and NSS versions do |
|
| 220 | + * have multiple bugs which likely lead to problems in combination with |
|
| 221 | + * functionality required by ownCloud such as SNI. |
|
| 222 | + * |
|
| 223 | + * @link https://github.com/owncloud/core/issues/17446#issuecomment-122877546 |
|
| 224 | + * @link https://bugzilla.redhat.com/show_bug.cgi?id=1241172 |
|
| 225 | + * @return string |
|
| 226 | + */ |
|
| 227 | + private function isUsedTlsLibOutdated() { |
|
| 228 | + // Don't run check when: |
|
| 229 | + // 1. Server has `has_internet_connection` set to false |
|
| 230 | + // 2. AppStore AND S2S is disabled |
|
| 231 | + if (!$this->config->getSystemValue('has_internet_connection', true)) { |
|
| 232 | + return ''; |
|
| 233 | + } |
|
| 234 | + if (!$this->config->getSystemValue('appstoreenabled', true) |
|
| 235 | + && $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'no' |
|
| 236 | + && $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'no') { |
|
| 237 | + return ''; |
|
| 238 | + } |
|
| 239 | + |
|
| 240 | + $versionString = $this->getCurlVersion(); |
|
| 241 | + if (isset($versionString['ssl_version'])) { |
|
| 242 | + $versionString = $versionString['ssl_version']; |
|
| 243 | + } else { |
|
| 244 | + return ''; |
|
| 245 | + } |
|
| 246 | + |
|
| 247 | + $features = $this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing'); |
|
| 248 | + if (!$this->config->getSystemValue('appstoreenabled', true)) { |
|
| 249 | + $features = $this->l10n->t('Federated Cloud Sharing'); |
|
| 250 | + } |
|
| 251 | + |
|
| 252 | + // Check if at least OpenSSL after 1.01d or 1.0.2b |
|
| 253 | + if (strpos($versionString, 'OpenSSL/') === 0) { |
|
| 254 | + $majorVersion = substr($versionString, 8, 5); |
|
| 255 | + $patchRelease = substr($versionString, 13, 6); |
|
| 256 | + |
|
| 257 | + if (($majorVersion === '1.0.1' && ord($patchRelease) < ord('d')) || |
|
| 258 | + ($majorVersion === '1.0.2' && ord($patchRelease) < ord('b'))) { |
|
| 259 | + 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]); |
|
| 260 | + } |
|
| 261 | + } |
|
| 262 | + |
|
| 263 | + // Check if NSS and perform heuristic check |
|
| 264 | + if (strpos($versionString, 'NSS/') === 0) { |
|
| 265 | + try { |
|
| 266 | + $firstClient = $this->clientService->newClient(); |
|
| 267 | + $firstClient->get('https://nextcloud.com/'); |
|
| 268 | + |
|
| 269 | + $secondClient = $this->clientService->newClient(); |
|
| 270 | + $secondClient->get('https://nextcloud.com/'); |
|
| 271 | + } catch (ClientException $e) { |
|
| 272 | + if ($e->getResponse()->getStatusCode() === 400) { |
|
| 273 | + 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]); |
|
| 274 | + } |
|
| 275 | + } catch (\Exception $e) { |
|
| 276 | + $this->logger->logException($e, ['app' => 'settings', 'level' => \OCP\ILogger::WARN]); |
|
| 277 | + 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.'); |
|
| 278 | + } |
|
| 279 | + } |
|
| 280 | + |
|
| 281 | + return ''; |
|
| 282 | + } |
|
| 283 | + |
|
| 284 | + /** |
|
| 285 | + * Whether the version is outdated |
|
| 286 | + * |
|
| 287 | + * @return bool |
|
| 288 | + */ |
|
| 289 | + protected function isPhpOutdated(): bool { |
|
| 290 | + return PHP_VERSION_ID < 70300; |
|
| 291 | + } |
|
| 292 | + |
|
| 293 | + /** |
|
| 294 | + * Whether the php version is still supported (at time of release) |
|
| 295 | + * according to: https://www.php.net/supported-versions.php |
|
| 296 | + * |
|
| 297 | + * @return array |
|
| 298 | + */ |
|
| 299 | + private function isPhpSupported(): array { |
|
| 300 | + return ['eol' => $this->isPhpOutdated(), 'version' => PHP_VERSION]; |
|
| 301 | + } |
|
| 302 | + |
|
| 303 | + /** |
|
| 304 | + * Check if the reverse proxy configuration is working as expected |
|
| 305 | + * |
|
| 306 | + * @return bool |
|
| 307 | + */ |
|
| 308 | + private function forwardedForHeadersWorking() { |
|
| 309 | + $trustedProxies = $this->config->getSystemValue('trusted_proxies', []); |
|
| 310 | + $remoteAddress = $this->request->getHeader('REMOTE_ADDR'); |
|
| 311 | + |
|
| 312 | + if (empty($trustedProxies) && $this->request->getHeader('X-Forwarded-Host') !== '') { |
|
| 313 | + return false; |
|
| 314 | + } |
|
| 315 | + |
|
| 316 | + if (\is_array($trustedProxies) && \in_array($remoteAddress, $trustedProxies, true)) { |
|
| 317 | + return $remoteAddress !== $this->request->getRemoteAddress(); |
|
| 318 | + } |
|
| 319 | + |
|
| 320 | + // either not enabled or working correctly |
|
| 321 | + return true; |
|
| 322 | + } |
|
| 323 | + |
|
| 324 | + /** |
|
| 325 | + * Checks if the correct memcache module for PHP is installed. Only |
|
| 326 | + * fails if memcached is configured and the working module is not installed. |
|
| 327 | + * |
|
| 328 | + * @return bool |
|
| 329 | + */ |
|
| 330 | + private function isCorrectMemcachedPHPModuleInstalled() { |
|
| 331 | + if ($this->config->getSystemValue('memcache.distributed', null) !== '\OC\Memcache\Memcached') { |
|
| 332 | + return true; |
|
| 333 | + } |
|
| 334 | + |
|
| 335 | + // there are two different memcached modules for PHP |
|
| 336 | + // we only support memcached and not memcache |
|
| 337 | + // https://code.google.com/p/memcached/wiki/PHPClientComparison |
|
| 338 | + return !(!extension_loaded('memcached') && extension_loaded('memcache')); |
|
| 339 | + } |
|
| 340 | + |
|
| 341 | + /** |
|
| 342 | + * Checks if set_time_limit is not disabled. |
|
| 343 | + * |
|
| 344 | + * @return bool |
|
| 345 | + */ |
|
| 346 | + private function isSettimelimitAvailable() { |
|
| 347 | + if (function_exists('set_time_limit') |
|
| 348 | + && strpos(@ini_get('disable_functions'), 'set_time_limit') === false) { |
|
| 349 | + return true; |
|
| 350 | + } |
|
| 351 | + |
|
| 352 | + return false; |
|
| 353 | + } |
|
| 354 | + |
|
| 355 | + /** |
|
| 356 | + * @return RedirectResponse |
|
| 357 | + */ |
|
| 358 | + public function rescanFailedIntegrityCheck() { |
|
| 359 | + $this->checker->runInstanceVerification(); |
|
| 360 | + return new RedirectResponse( |
|
| 361 | + $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'overview']) |
|
| 362 | + ); |
|
| 363 | + } |
|
| 364 | + |
|
| 365 | + /** |
|
| 366 | + * @NoCSRFRequired |
|
| 367 | + * @return DataResponse |
|
| 368 | + */ |
|
| 369 | + public function getFailedIntegrityCheckFiles() { |
|
| 370 | + if (!$this->checker->isCodeCheckEnforced()) { |
|
| 371 | + return new DataDisplayResponse('Integrity checker has been disabled. Integrity cannot be verified.'); |
|
| 372 | + } |
|
| 373 | + |
|
| 374 | + $completeResults = $this->checker->getResults(); |
|
| 375 | + |
|
| 376 | + if (!empty($completeResults)) { |
|
| 377 | + $formattedTextResponse = 'Technical information |
|
| 378 | 378 | ===================== |
| 379 | 379 | The following list covers which files have failed the integrity check. Please read |
| 380 | 380 | the previous linked documentation to learn more about the errors and how to fix |
@@ -383,391 +383,391 @@ discard block |
||
| 383 | 383 | Results |
| 384 | 384 | ======= |
| 385 | 385 | '; |
| 386 | - foreach ($completeResults as $context => $contextResult) { |
|
| 387 | - $formattedTextResponse .= "- $context\n"; |
|
| 388 | - |
|
| 389 | - foreach ($contextResult as $category => $result) { |
|
| 390 | - $formattedTextResponse .= "\t- $category\n"; |
|
| 391 | - if ($category !== 'EXCEPTION') { |
|
| 392 | - foreach ($result as $key => $results) { |
|
| 393 | - $formattedTextResponse .= "\t\t- $key\n"; |
|
| 394 | - } |
|
| 395 | - } else { |
|
| 396 | - foreach ($result as $key => $results) { |
|
| 397 | - $formattedTextResponse .= "\t\t- $results\n"; |
|
| 398 | - } |
|
| 399 | - } |
|
| 400 | - } |
|
| 401 | - } |
|
| 402 | - |
|
| 403 | - $formattedTextResponse .= ' |
|
| 386 | + foreach ($completeResults as $context => $contextResult) { |
|
| 387 | + $formattedTextResponse .= "- $context\n"; |
|
| 388 | + |
|
| 389 | + foreach ($contextResult as $category => $result) { |
|
| 390 | + $formattedTextResponse .= "\t- $category\n"; |
|
| 391 | + if ($category !== 'EXCEPTION') { |
|
| 392 | + foreach ($result as $key => $results) { |
|
| 393 | + $formattedTextResponse .= "\t\t- $key\n"; |
|
| 394 | + } |
|
| 395 | + } else { |
|
| 396 | + foreach ($result as $key => $results) { |
|
| 397 | + $formattedTextResponse .= "\t\t- $results\n"; |
|
| 398 | + } |
|
| 399 | + } |
|
| 400 | + } |
|
| 401 | + } |
|
| 402 | + |
|
| 403 | + $formattedTextResponse .= ' |
|
| 404 | 404 | Raw output |
| 405 | 405 | ========== |
| 406 | 406 | '; |
| 407 | - $formattedTextResponse .= print_r($completeResults, true); |
|
| 408 | - } else { |
|
| 409 | - $formattedTextResponse = 'No errors have been found.'; |
|
| 410 | - } |
|
| 411 | - |
|
| 412 | - |
|
| 413 | - $response = new DataDisplayResponse( |
|
| 414 | - $formattedTextResponse, |
|
| 415 | - Http::STATUS_OK, |
|
| 416 | - [ |
|
| 417 | - 'Content-Type' => 'text/plain', |
|
| 418 | - ] |
|
| 419 | - ); |
|
| 420 | - |
|
| 421 | - return $response; |
|
| 422 | - } |
|
| 423 | - |
|
| 424 | - /** |
|
| 425 | - * Checks whether a PHP opcache is properly set up |
|
| 426 | - * @return bool |
|
| 427 | - */ |
|
| 428 | - protected function isOpcacheProperlySetup() { |
|
| 429 | - if (!$this->iniGetWrapper->getBool('opcache.enable')) { |
|
| 430 | - return false; |
|
| 431 | - } |
|
| 432 | - |
|
| 433 | - if (!$this->iniGetWrapper->getBool('opcache.save_comments')) { |
|
| 434 | - return false; |
|
| 435 | - } |
|
| 436 | - |
|
| 437 | - if ($this->iniGetWrapper->getNumeric('opcache.max_accelerated_files') < 10000) { |
|
| 438 | - return false; |
|
| 439 | - } |
|
| 440 | - |
|
| 441 | - if ($this->iniGetWrapper->getNumeric('opcache.memory_consumption') < 128) { |
|
| 442 | - return false; |
|
| 443 | - } |
|
| 444 | - |
|
| 445 | - if ($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') < 8) { |
|
| 446 | - return false; |
|
| 447 | - } |
|
| 448 | - |
|
| 449 | - return true; |
|
| 450 | - } |
|
| 451 | - |
|
| 452 | - /** |
|
| 453 | - * Check if the required FreeType functions are present |
|
| 454 | - * @return bool |
|
| 455 | - */ |
|
| 456 | - protected function hasFreeTypeSupport() { |
|
| 457 | - return function_exists('imagettfbbox') && function_exists('imagettftext'); |
|
| 458 | - } |
|
| 459 | - |
|
| 460 | - protected function hasMissingIndexes(): array { |
|
| 461 | - $indexInfo = new MissingIndexInformation(); |
|
| 462 | - // Dispatch event so apps can also hint for pending index updates if needed |
|
| 463 | - $event = new GenericEvent($indexInfo); |
|
| 464 | - $this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_INDEXES_EVENT, $event); |
|
| 465 | - |
|
| 466 | - return $indexInfo->getListOfMissingIndexes(); |
|
| 467 | - } |
|
| 468 | - |
|
| 469 | - protected function hasMissingPrimaryKeys(): array { |
|
| 470 | - $info = new MissingPrimaryKeyInformation(); |
|
| 471 | - // Dispatch event so apps can also hint for pending index updates if needed |
|
| 472 | - $event = new GenericEvent($info); |
|
| 473 | - $this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_PRIMARY_KEYS_EVENT, $event); |
|
| 474 | - |
|
| 475 | - return $info->getListOfMissingPrimaryKeys(); |
|
| 476 | - } |
|
| 477 | - |
|
| 478 | - protected function hasMissingColumns(): array { |
|
| 479 | - $indexInfo = new MissingColumnInformation(); |
|
| 480 | - // Dispatch event so apps can also hint for pending index updates if needed |
|
| 481 | - $event = new GenericEvent($indexInfo); |
|
| 482 | - $this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_COLUMNS_EVENT, $event); |
|
| 483 | - |
|
| 484 | - return $indexInfo->getListOfMissingColumns(); |
|
| 485 | - } |
|
| 486 | - |
|
| 487 | - protected function isSqliteUsed() { |
|
| 488 | - return strpos($this->config->getSystemValue('dbtype'), 'sqlite') !== false; |
|
| 489 | - } |
|
| 490 | - |
|
| 491 | - protected function isReadOnlyConfig(): bool { |
|
| 492 | - return \OC_Helper::isReadOnlyConfigEnabled(); |
|
| 493 | - } |
|
| 494 | - |
|
| 495 | - protected function hasValidTransactionIsolationLevel(): bool { |
|
| 496 | - try { |
|
| 497 | - if ($this->db->getDatabasePlatform() instanceof SqlitePlatform) { |
|
| 498 | - return true; |
|
| 499 | - } |
|
| 500 | - |
|
| 501 | - return $this->db->getTransactionIsolation() === TransactionIsolationLevel::READ_COMMITTED; |
|
| 502 | - } catch (Exception $e) { |
|
| 503 | - // ignore |
|
| 504 | - } |
|
| 505 | - |
|
| 506 | - return true; |
|
| 507 | - } |
|
| 508 | - |
|
| 509 | - protected function hasFileinfoInstalled(): bool { |
|
| 510 | - return \OC_Util::fileInfoLoaded(); |
|
| 511 | - } |
|
| 512 | - |
|
| 513 | - protected function hasWorkingFileLocking(): bool { |
|
| 514 | - return !($this->lockingProvider instanceof NoopLockingProvider); |
|
| 515 | - } |
|
| 516 | - |
|
| 517 | - protected function getSuggestedOverwriteCliURL(): string { |
|
| 518 | - $suggestedOverwriteCliUrl = ''; |
|
| 519 | - if ($this->config->getSystemValue('overwrite.cli.url', '') === '') { |
|
| 520 | - $suggestedOverwriteCliUrl = $this->request->getServerProtocol() . '://' . $this->request->getInsecureServerHost() . \OC::$WEBROOT; |
|
| 521 | - if (!$this->config->getSystemValue('config_is_read_only', false)) { |
|
| 522 | - // Set the overwrite URL when it was not set yet. |
|
| 523 | - $this->config->setSystemValue('overwrite.cli.url', $suggestedOverwriteCliUrl); |
|
| 524 | - $suggestedOverwriteCliUrl = ''; |
|
| 525 | - } |
|
| 526 | - } |
|
| 527 | - return $suggestedOverwriteCliUrl; |
|
| 528 | - } |
|
| 529 | - |
|
| 530 | - protected function getLastCronInfo(): array { |
|
| 531 | - $lastCronRun = $this->config->getAppValue('core', 'lastcron', 0); |
|
| 532 | - return [ |
|
| 533 | - 'diffInSeconds' => time() - $lastCronRun, |
|
| 534 | - 'relativeTime' => $this->dateTimeFormatter->formatTimeSpan($lastCronRun), |
|
| 535 | - 'backgroundJobsUrl' => $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'server']) . '#backgroundjobs', |
|
| 536 | - ]; |
|
| 537 | - } |
|
| 538 | - |
|
| 539 | - protected function getCronErrors() { |
|
| 540 | - $errors = json_decode($this->config->getAppValue('core', 'cronErrors', ''), true); |
|
| 541 | - |
|
| 542 | - if (is_array($errors)) { |
|
| 543 | - return $errors; |
|
| 544 | - } |
|
| 545 | - |
|
| 546 | - return []; |
|
| 547 | - } |
|
| 548 | - |
|
| 549 | - protected function hasOpcacheLoaded(): bool { |
|
| 550 | - return extension_loaded('Zend OPcache'); |
|
| 551 | - } |
|
| 552 | - |
|
| 553 | - /** |
|
| 554 | - * Iterates through the configured app roots and |
|
| 555 | - * tests if the subdirectories are owned by the same user than the current user. |
|
| 556 | - * |
|
| 557 | - * @return array |
|
| 558 | - */ |
|
| 559 | - protected function getAppDirsWithDifferentOwner(): array { |
|
| 560 | - $currentUser = posix_getuid(); |
|
| 561 | - $appDirsWithDifferentOwner = [[]]; |
|
| 562 | - |
|
| 563 | - foreach (OC::$APPSROOTS as $appRoot) { |
|
| 564 | - if ($appRoot['writable'] === true) { |
|
| 565 | - $appDirsWithDifferentOwner[] = $this->getAppDirsWithDifferentOwnerForAppRoot($currentUser, $appRoot); |
|
| 566 | - } |
|
| 567 | - } |
|
| 568 | - |
|
| 569 | - $appDirsWithDifferentOwner = array_merge(...$appDirsWithDifferentOwner); |
|
| 570 | - sort($appDirsWithDifferentOwner); |
|
| 571 | - |
|
| 572 | - return $appDirsWithDifferentOwner; |
|
| 573 | - } |
|
| 574 | - |
|
| 575 | - /** |
|
| 576 | - * Tests if the directories for one apps directory are writable by the current user. |
|
| 577 | - * |
|
| 578 | - * @param int $currentUser The current user |
|
| 579 | - * @param array $appRoot The app root config |
|
| 580 | - * @return string[] The none writable directory paths inside the app root |
|
| 581 | - */ |
|
| 582 | - private function getAppDirsWithDifferentOwnerForAppRoot(int $currentUser, array $appRoot): array { |
|
| 583 | - $appDirsWithDifferentOwner = []; |
|
| 584 | - $appsPath = $appRoot['path']; |
|
| 585 | - $appsDir = new DirectoryIterator($appRoot['path']); |
|
| 586 | - |
|
| 587 | - foreach ($appsDir as $fileInfo) { |
|
| 588 | - if ($fileInfo->isDir() && !$fileInfo->isDot()) { |
|
| 589 | - $absAppPath = $appsPath . DIRECTORY_SEPARATOR . $fileInfo->getFilename(); |
|
| 590 | - $appDirUser = fileowner($absAppPath); |
|
| 591 | - if ($appDirUser !== $currentUser) { |
|
| 592 | - $appDirsWithDifferentOwner[] = $absAppPath; |
|
| 593 | - } |
|
| 594 | - } |
|
| 595 | - } |
|
| 596 | - |
|
| 597 | - return $appDirsWithDifferentOwner; |
|
| 598 | - } |
|
| 599 | - |
|
| 600 | - /** |
|
| 601 | - * Checks for potential PHP modules that would improve the instance |
|
| 602 | - * |
|
| 603 | - * @return string[] A list of PHP modules that is recommended |
|
| 604 | - */ |
|
| 605 | - protected function hasRecommendedPHPModules(): array { |
|
| 606 | - $recommendedPHPModules = []; |
|
| 607 | - |
|
| 608 | - if (!extension_loaded('intl')) { |
|
| 609 | - $recommendedPHPModules[] = 'intl'; |
|
| 610 | - } |
|
| 611 | - |
|
| 612 | - if (!extension_loaded('bcmath')) { |
|
| 613 | - $recommendedPHPModules[] = 'bcmath'; |
|
| 614 | - } |
|
| 615 | - |
|
| 616 | - if (!extension_loaded('gmp')) { |
|
| 617 | - $recommendedPHPModules[] = 'gmp'; |
|
| 618 | - } |
|
| 619 | - |
|
| 620 | - if ($this->config->getAppValue('theming', 'enabled', 'no') === 'yes') { |
|
| 621 | - if (!extension_loaded('imagick')) { |
|
| 622 | - $recommendedPHPModules[] = 'imagick'; |
|
| 623 | - } |
|
| 624 | - } |
|
| 625 | - |
|
| 626 | - return $recommendedPHPModules; |
|
| 627 | - } |
|
| 628 | - |
|
| 629 | - protected function isMysqlUsedWithoutUTF8MB4(): bool { |
|
| 630 | - return ($this->config->getSystemValue('dbtype', 'sqlite') === 'mysql') && ($this->config->getSystemValue('mysql.utf8mb4', false) === false); |
|
| 631 | - } |
|
| 632 | - |
|
| 633 | - protected function hasBigIntConversionPendingColumns(): array { |
|
| 634 | - // copy of ConvertFilecacheBigInt::getColumnsByTable() |
|
| 635 | - $tables = [ |
|
| 636 | - 'activity' => ['activity_id', 'object_id'], |
|
| 637 | - 'activity_mq' => ['mail_id'], |
|
| 638 | - 'authtoken' => ['id'], |
|
| 639 | - 'bruteforce_attempts' => ['id'], |
|
| 640 | - 'federated_reshares' => ['share_id'], |
|
| 641 | - 'filecache' => ['fileid', 'storage', 'parent', 'mimetype', 'mimepart', 'mtime', 'storage_mtime'], |
|
| 642 | - 'filecache_extended' => ['fileid'], |
|
| 643 | - 'file_locks' => ['id'], |
|
| 644 | - 'jobs' => ['id'], |
|
| 645 | - 'mimetypes' => ['id'], |
|
| 646 | - 'mounts' => ['id', 'storage_id', 'root_id', 'mount_id'], |
|
| 647 | - 'share_external' => ['id', 'parent'], |
|
| 648 | - 'storages' => ['numeric_id'], |
|
| 649 | - ]; |
|
| 650 | - |
|
| 651 | - $schema = new SchemaWrapper($this->db); |
|
| 652 | - $isSqlite = $this->db->getDatabasePlatform() instanceof SqlitePlatform; |
|
| 653 | - $pendingColumns = []; |
|
| 654 | - |
|
| 655 | - foreach ($tables as $tableName => $columns) { |
|
| 656 | - if (!$schema->hasTable($tableName)) { |
|
| 657 | - continue; |
|
| 658 | - } |
|
| 659 | - |
|
| 660 | - $table = $schema->getTable($tableName); |
|
| 661 | - foreach ($columns as $columnName) { |
|
| 662 | - $column = $table->getColumn($columnName); |
|
| 663 | - $isAutoIncrement = $column->getAutoincrement(); |
|
| 664 | - $isAutoIncrementOnSqlite = $isSqlite && $isAutoIncrement; |
|
| 665 | - if ($column->getType()->getName() !== Types::BIGINT && !$isAutoIncrementOnSqlite) { |
|
| 666 | - $pendingColumns[] = $tableName . '.' . $columnName; |
|
| 667 | - } |
|
| 668 | - } |
|
| 669 | - } |
|
| 670 | - |
|
| 671 | - return $pendingColumns; |
|
| 672 | - } |
|
| 673 | - |
|
| 674 | - protected function isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed(): bool { |
|
| 675 | - $objectStore = $this->config->getSystemValue('objectstore', null); |
|
| 676 | - $objectStoreMultibucket = $this->config->getSystemValue('objectstore_multibucket', null); |
|
| 677 | - |
|
| 678 | - if (!isset($objectStoreMultibucket) && !isset($objectStore)) { |
|
| 679 | - return true; |
|
| 680 | - } |
|
| 681 | - |
|
| 682 | - if (isset($objectStoreMultibucket['class']) && $objectStoreMultibucket['class'] !== 'OC\\Files\\ObjectStore\\S3') { |
|
| 683 | - return true; |
|
| 684 | - } |
|
| 685 | - |
|
| 686 | - if (isset($objectStore['class']) && $objectStore['class'] !== 'OC\\Files\\ObjectStore\\S3') { |
|
| 687 | - return true; |
|
| 688 | - } |
|
| 689 | - |
|
| 690 | - $tempPath = sys_get_temp_dir(); |
|
| 691 | - if (!is_dir($tempPath)) { |
|
| 692 | - $this->logger->error('Error while checking the temporary PHP path - it was not properly set to a directory. value: ' . $tempPath); |
|
| 693 | - return false; |
|
| 694 | - } |
|
| 695 | - $freeSpaceInTemp = disk_free_space($tempPath); |
|
| 696 | - if ($freeSpaceInTemp === false) { |
|
| 697 | - $this->logger->error('Error while checking the available disk space of temporary PHP path - no free disk space returned. temporary path: ' . $tempPath); |
|
| 698 | - return false; |
|
| 699 | - } |
|
| 700 | - |
|
| 701 | - $freeSpaceInTempInGB = $freeSpaceInTemp / 1024 / 1024 / 1024; |
|
| 702 | - if ($freeSpaceInTempInGB > 50) { |
|
| 703 | - return true; |
|
| 704 | - } |
|
| 705 | - |
|
| 706 | - $this->logger->warning('Checking the available space in the temporary path resulted in ' . round($freeSpaceInTempInGB, 1) . ' GB instead of the recommended 50GB. Path: ' . $tempPath); |
|
| 707 | - return false; |
|
| 708 | - } |
|
| 709 | - |
|
| 710 | - protected function imageMagickLacksSVGSupport(): bool { |
|
| 711 | - return extension_loaded('imagick') && count(\Imagick::queryFormats('SVG')) === 0; |
|
| 712 | - } |
|
| 713 | - |
|
| 714 | - /** |
|
| 715 | - * @return DataResponse |
|
| 716 | - */ |
|
| 717 | - public function check() { |
|
| 718 | - $phpDefaultCharset = new PhpDefaultCharset(); |
|
| 719 | - $phpOutputBuffering = new PhpOutputBuffering(); |
|
| 720 | - $legacySSEKeyFormat = new LegacySSEKeyFormat($this->l10n, $this->config, $this->urlGenerator); |
|
| 721 | - $checkUserCertificates = new CheckUserCertificates($this->l10n, $this->config, $this->urlGenerator); |
|
| 722 | - $supportedDatabases = new SupportedDatabase($this->l10n, $this->connection); |
|
| 723 | - |
|
| 724 | - return new DataResponse( |
|
| 725 | - [ |
|
| 726 | - 'isGetenvServerWorking' => !empty(getenv('PATH')), |
|
| 727 | - 'isReadOnlyConfig' => $this->isReadOnlyConfig(), |
|
| 728 | - 'hasValidTransactionIsolationLevel' => $this->hasValidTransactionIsolationLevel(), |
|
| 729 | - 'hasFileinfoInstalled' => $this->hasFileinfoInstalled(), |
|
| 730 | - 'hasWorkingFileLocking' => $this->hasWorkingFileLocking(), |
|
| 731 | - 'suggestedOverwriteCliURL' => $this->getSuggestedOverwriteCliURL(), |
|
| 732 | - 'cronInfo' => $this->getLastCronInfo(), |
|
| 733 | - 'cronErrors' => $this->getCronErrors(), |
|
| 734 | - 'serverHasInternetConnectionProblems' => $this->hasInternetConnectivityProblems(), |
|
| 735 | - 'isMemcacheConfigured' => $this->isMemcacheConfigured(), |
|
| 736 | - 'memcacheDocs' => $this->urlGenerator->linkToDocs('admin-performance'), |
|
| 737 | - 'isRandomnessSecure' => $this->isRandomnessSecure(), |
|
| 738 | - 'securityDocs' => $this->urlGenerator->linkToDocs('admin-security'), |
|
| 739 | - 'isUsedTlsLibOutdated' => $this->isUsedTlsLibOutdated(), |
|
| 740 | - 'phpSupported' => $this->isPhpSupported(), |
|
| 741 | - 'forwardedForHeadersWorking' => $this->forwardedForHeadersWorking(), |
|
| 742 | - 'reverseProxyDocs' => $this->urlGenerator->linkToDocs('admin-reverse-proxy'), |
|
| 743 | - 'isCorrectMemcachedPHPModuleInstalled' => $this->isCorrectMemcachedPHPModuleInstalled(), |
|
| 744 | - 'hasPassedCodeIntegrityCheck' => $this->checker->hasPassedCheck(), |
|
| 745 | - 'codeIntegrityCheckerDocumentation' => $this->urlGenerator->linkToDocs('admin-code-integrity'), |
|
| 746 | - 'isOpcacheProperlySetup' => $this->isOpcacheProperlySetup(), |
|
| 747 | - 'hasOpcacheLoaded' => $this->hasOpcacheLoaded(), |
|
| 748 | - 'phpOpcacheDocumentation' => $this->urlGenerator->linkToDocs('admin-php-opcache'), |
|
| 749 | - 'isSettimelimitAvailable' => $this->isSettimelimitAvailable(), |
|
| 750 | - 'hasFreeTypeSupport' => $this->hasFreeTypeSupport(), |
|
| 751 | - 'missingPrimaryKeys' => $this->hasMissingPrimaryKeys(), |
|
| 752 | - 'missingIndexes' => $this->hasMissingIndexes(), |
|
| 753 | - 'missingColumns' => $this->hasMissingColumns(), |
|
| 754 | - 'isSqliteUsed' => $this->isSqliteUsed(), |
|
| 755 | - 'databaseConversionDocumentation' => $this->urlGenerator->linkToDocs('admin-db-conversion'), |
|
| 756 | - 'isMemoryLimitSufficient' => $this->memoryInfo->isMemoryLimitSufficient(), |
|
| 757 | - 'appDirsWithDifferentOwner' => $this->getAppDirsWithDifferentOwner(), |
|
| 758 | - 'recommendedPHPModules' => $this->hasRecommendedPHPModules(), |
|
| 759 | - 'pendingBigIntConversionColumns' => $this->hasBigIntConversionPendingColumns(), |
|
| 760 | - 'isMysqlUsedWithoutUTF8MB4' => $this->isMysqlUsedWithoutUTF8MB4(), |
|
| 761 | - 'isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed' => $this->isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed(), |
|
| 762 | - 'reverseProxyGeneratedURL' => $this->urlGenerator->getAbsoluteURL('index.php'), |
|
| 763 | - 'imageMagickLacksSVGSupport' => $this->imageMagickLacksSVGSupport(), |
|
| 764 | - PhpDefaultCharset::class => ['pass' => $phpDefaultCharset->run(), 'description' => $phpDefaultCharset->description(), 'severity' => $phpDefaultCharset->severity()], |
|
| 765 | - PhpOutputBuffering::class => ['pass' => $phpOutputBuffering->run(), 'description' => $phpOutputBuffering->description(), 'severity' => $phpOutputBuffering->severity()], |
|
| 766 | - LegacySSEKeyFormat::class => ['pass' => $legacySSEKeyFormat->run(), 'description' => $legacySSEKeyFormat->description(), 'severity' => $legacySSEKeyFormat->severity(), 'linkToDocumentation' => $legacySSEKeyFormat->linkToDocumentation()], |
|
| 767 | - CheckUserCertificates::class => ['pass' => $checkUserCertificates->run(), 'description' => $checkUserCertificates->description(), 'severity' => $checkUserCertificates->severity(), 'elements' => $checkUserCertificates->elements()], |
|
| 768 | - 'isDefaultPhoneRegionSet' => $this->config->getSystemValueString('default_phone_region', '') !== '', |
|
| 769 | - SupportedDatabase::class => ['pass' => $supportedDatabases->run(), 'description' => $supportedDatabases->description(), 'severity' => $supportedDatabases->severity()], |
|
| 770 | - ] |
|
| 771 | - ); |
|
| 772 | - } |
|
| 407 | + $formattedTextResponse .= print_r($completeResults, true); |
|
| 408 | + } else { |
|
| 409 | + $formattedTextResponse = 'No errors have been found.'; |
|
| 410 | + } |
|
| 411 | + |
|
| 412 | + |
|
| 413 | + $response = new DataDisplayResponse( |
|
| 414 | + $formattedTextResponse, |
|
| 415 | + Http::STATUS_OK, |
|
| 416 | + [ |
|
| 417 | + 'Content-Type' => 'text/plain', |
|
| 418 | + ] |
|
| 419 | + ); |
|
| 420 | + |
|
| 421 | + return $response; |
|
| 422 | + } |
|
| 423 | + |
|
| 424 | + /** |
|
| 425 | + * Checks whether a PHP opcache is properly set up |
|
| 426 | + * @return bool |
|
| 427 | + */ |
|
| 428 | + protected function isOpcacheProperlySetup() { |
|
| 429 | + if (!$this->iniGetWrapper->getBool('opcache.enable')) { |
|
| 430 | + return false; |
|
| 431 | + } |
|
| 432 | + |
|
| 433 | + if (!$this->iniGetWrapper->getBool('opcache.save_comments')) { |
|
| 434 | + return false; |
|
| 435 | + } |
|
| 436 | + |
|
| 437 | + if ($this->iniGetWrapper->getNumeric('opcache.max_accelerated_files') < 10000) { |
|
| 438 | + return false; |
|
| 439 | + } |
|
| 440 | + |
|
| 441 | + if ($this->iniGetWrapper->getNumeric('opcache.memory_consumption') < 128) { |
|
| 442 | + return false; |
|
| 443 | + } |
|
| 444 | + |
|
| 445 | + if ($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') < 8) { |
|
| 446 | + return false; |
|
| 447 | + } |
|
| 448 | + |
|
| 449 | + return true; |
|
| 450 | + } |
|
| 451 | + |
|
| 452 | + /** |
|
| 453 | + * Check if the required FreeType functions are present |
|
| 454 | + * @return bool |
|
| 455 | + */ |
|
| 456 | + protected function hasFreeTypeSupport() { |
|
| 457 | + return function_exists('imagettfbbox') && function_exists('imagettftext'); |
|
| 458 | + } |
|
| 459 | + |
|
| 460 | + protected function hasMissingIndexes(): array { |
|
| 461 | + $indexInfo = new MissingIndexInformation(); |
|
| 462 | + // Dispatch event so apps can also hint for pending index updates if needed |
|
| 463 | + $event = new GenericEvent($indexInfo); |
|
| 464 | + $this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_INDEXES_EVENT, $event); |
|
| 465 | + |
|
| 466 | + return $indexInfo->getListOfMissingIndexes(); |
|
| 467 | + } |
|
| 468 | + |
|
| 469 | + protected function hasMissingPrimaryKeys(): array { |
|
| 470 | + $info = new MissingPrimaryKeyInformation(); |
|
| 471 | + // Dispatch event so apps can also hint for pending index updates if needed |
|
| 472 | + $event = new GenericEvent($info); |
|
| 473 | + $this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_PRIMARY_KEYS_EVENT, $event); |
|
| 474 | + |
|
| 475 | + return $info->getListOfMissingPrimaryKeys(); |
|
| 476 | + } |
|
| 477 | + |
|
| 478 | + protected function hasMissingColumns(): array { |
|
| 479 | + $indexInfo = new MissingColumnInformation(); |
|
| 480 | + // Dispatch event so apps can also hint for pending index updates if needed |
|
| 481 | + $event = new GenericEvent($indexInfo); |
|
| 482 | + $this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_COLUMNS_EVENT, $event); |
|
| 483 | + |
|
| 484 | + return $indexInfo->getListOfMissingColumns(); |
|
| 485 | + } |
|
| 486 | + |
|
| 487 | + protected function isSqliteUsed() { |
|
| 488 | + return strpos($this->config->getSystemValue('dbtype'), 'sqlite') !== false; |
|
| 489 | + } |
|
| 490 | + |
|
| 491 | + protected function isReadOnlyConfig(): bool { |
|
| 492 | + return \OC_Helper::isReadOnlyConfigEnabled(); |
|
| 493 | + } |
|
| 494 | + |
|
| 495 | + protected function hasValidTransactionIsolationLevel(): bool { |
|
| 496 | + try { |
|
| 497 | + if ($this->db->getDatabasePlatform() instanceof SqlitePlatform) { |
|
| 498 | + return true; |
|
| 499 | + } |
|
| 500 | + |
|
| 501 | + return $this->db->getTransactionIsolation() === TransactionIsolationLevel::READ_COMMITTED; |
|
| 502 | + } catch (Exception $e) { |
|
| 503 | + // ignore |
|
| 504 | + } |
|
| 505 | + |
|
| 506 | + return true; |
|
| 507 | + } |
|
| 508 | + |
|
| 509 | + protected function hasFileinfoInstalled(): bool { |
|
| 510 | + return \OC_Util::fileInfoLoaded(); |
|
| 511 | + } |
|
| 512 | + |
|
| 513 | + protected function hasWorkingFileLocking(): bool { |
|
| 514 | + return !($this->lockingProvider instanceof NoopLockingProvider); |
|
| 515 | + } |
|
| 516 | + |
|
| 517 | + protected function getSuggestedOverwriteCliURL(): string { |
|
| 518 | + $suggestedOverwriteCliUrl = ''; |
|
| 519 | + if ($this->config->getSystemValue('overwrite.cli.url', '') === '') { |
|
| 520 | + $suggestedOverwriteCliUrl = $this->request->getServerProtocol() . '://' . $this->request->getInsecureServerHost() . \OC::$WEBROOT; |
|
| 521 | + if (!$this->config->getSystemValue('config_is_read_only', false)) { |
|
| 522 | + // Set the overwrite URL when it was not set yet. |
|
| 523 | + $this->config->setSystemValue('overwrite.cli.url', $suggestedOverwriteCliUrl); |
|
| 524 | + $suggestedOverwriteCliUrl = ''; |
|
| 525 | + } |
|
| 526 | + } |
|
| 527 | + return $suggestedOverwriteCliUrl; |
|
| 528 | + } |
|
| 529 | + |
|
| 530 | + protected function getLastCronInfo(): array { |
|
| 531 | + $lastCronRun = $this->config->getAppValue('core', 'lastcron', 0); |
|
| 532 | + return [ |
|
| 533 | + 'diffInSeconds' => time() - $lastCronRun, |
|
| 534 | + 'relativeTime' => $this->dateTimeFormatter->formatTimeSpan($lastCronRun), |
|
| 535 | + 'backgroundJobsUrl' => $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'server']) . '#backgroundjobs', |
|
| 536 | + ]; |
|
| 537 | + } |
|
| 538 | + |
|
| 539 | + protected function getCronErrors() { |
|
| 540 | + $errors = json_decode($this->config->getAppValue('core', 'cronErrors', ''), true); |
|
| 541 | + |
|
| 542 | + if (is_array($errors)) { |
|
| 543 | + return $errors; |
|
| 544 | + } |
|
| 545 | + |
|
| 546 | + return []; |
|
| 547 | + } |
|
| 548 | + |
|
| 549 | + protected function hasOpcacheLoaded(): bool { |
|
| 550 | + return extension_loaded('Zend OPcache'); |
|
| 551 | + } |
|
| 552 | + |
|
| 553 | + /** |
|
| 554 | + * Iterates through the configured app roots and |
|
| 555 | + * tests if the subdirectories are owned by the same user than the current user. |
|
| 556 | + * |
|
| 557 | + * @return array |
|
| 558 | + */ |
|
| 559 | + protected function getAppDirsWithDifferentOwner(): array { |
|
| 560 | + $currentUser = posix_getuid(); |
|
| 561 | + $appDirsWithDifferentOwner = [[]]; |
|
| 562 | + |
|
| 563 | + foreach (OC::$APPSROOTS as $appRoot) { |
|
| 564 | + if ($appRoot['writable'] === true) { |
|
| 565 | + $appDirsWithDifferentOwner[] = $this->getAppDirsWithDifferentOwnerForAppRoot($currentUser, $appRoot); |
|
| 566 | + } |
|
| 567 | + } |
|
| 568 | + |
|
| 569 | + $appDirsWithDifferentOwner = array_merge(...$appDirsWithDifferentOwner); |
|
| 570 | + sort($appDirsWithDifferentOwner); |
|
| 571 | + |
|
| 572 | + return $appDirsWithDifferentOwner; |
|
| 573 | + } |
|
| 574 | + |
|
| 575 | + /** |
|
| 576 | + * Tests if the directories for one apps directory are writable by the current user. |
|
| 577 | + * |
|
| 578 | + * @param int $currentUser The current user |
|
| 579 | + * @param array $appRoot The app root config |
|
| 580 | + * @return string[] The none writable directory paths inside the app root |
|
| 581 | + */ |
|
| 582 | + private function getAppDirsWithDifferentOwnerForAppRoot(int $currentUser, array $appRoot): array { |
|
| 583 | + $appDirsWithDifferentOwner = []; |
|
| 584 | + $appsPath = $appRoot['path']; |
|
| 585 | + $appsDir = new DirectoryIterator($appRoot['path']); |
|
| 586 | + |
|
| 587 | + foreach ($appsDir as $fileInfo) { |
|
| 588 | + if ($fileInfo->isDir() && !$fileInfo->isDot()) { |
|
| 589 | + $absAppPath = $appsPath . DIRECTORY_SEPARATOR . $fileInfo->getFilename(); |
|
| 590 | + $appDirUser = fileowner($absAppPath); |
|
| 591 | + if ($appDirUser !== $currentUser) { |
|
| 592 | + $appDirsWithDifferentOwner[] = $absAppPath; |
|
| 593 | + } |
|
| 594 | + } |
|
| 595 | + } |
|
| 596 | + |
|
| 597 | + return $appDirsWithDifferentOwner; |
|
| 598 | + } |
|
| 599 | + |
|
| 600 | + /** |
|
| 601 | + * Checks for potential PHP modules that would improve the instance |
|
| 602 | + * |
|
| 603 | + * @return string[] A list of PHP modules that is recommended |
|
| 604 | + */ |
|
| 605 | + protected function hasRecommendedPHPModules(): array { |
|
| 606 | + $recommendedPHPModules = []; |
|
| 607 | + |
|
| 608 | + if (!extension_loaded('intl')) { |
|
| 609 | + $recommendedPHPModules[] = 'intl'; |
|
| 610 | + } |
|
| 611 | + |
|
| 612 | + if (!extension_loaded('bcmath')) { |
|
| 613 | + $recommendedPHPModules[] = 'bcmath'; |
|
| 614 | + } |
|
| 615 | + |
|
| 616 | + if (!extension_loaded('gmp')) { |
|
| 617 | + $recommendedPHPModules[] = 'gmp'; |
|
| 618 | + } |
|
| 619 | + |
|
| 620 | + if ($this->config->getAppValue('theming', 'enabled', 'no') === 'yes') { |
|
| 621 | + if (!extension_loaded('imagick')) { |
|
| 622 | + $recommendedPHPModules[] = 'imagick'; |
|
| 623 | + } |
|
| 624 | + } |
|
| 625 | + |
|
| 626 | + return $recommendedPHPModules; |
|
| 627 | + } |
|
| 628 | + |
|
| 629 | + protected function isMysqlUsedWithoutUTF8MB4(): bool { |
|
| 630 | + return ($this->config->getSystemValue('dbtype', 'sqlite') === 'mysql') && ($this->config->getSystemValue('mysql.utf8mb4', false) === false); |
|
| 631 | + } |
|
| 632 | + |
|
| 633 | + protected function hasBigIntConversionPendingColumns(): array { |
|
| 634 | + // copy of ConvertFilecacheBigInt::getColumnsByTable() |
|
| 635 | + $tables = [ |
|
| 636 | + 'activity' => ['activity_id', 'object_id'], |
|
| 637 | + 'activity_mq' => ['mail_id'], |
|
| 638 | + 'authtoken' => ['id'], |
|
| 639 | + 'bruteforce_attempts' => ['id'], |
|
| 640 | + 'federated_reshares' => ['share_id'], |
|
| 641 | + 'filecache' => ['fileid', 'storage', 'parent', 'mimetype', 'mimepart', 'mtime', 'storage_mtime'], |
|
| 642 | + 'filecache_extended' => ['fileid'], |
|
| 643 | + 'file_locks' => ['id'], |
|
| 644 | + 'jobs' => ['id'], |
|
| 645 | + 'mimetypes' => ['id'], |
|
| 646 | + 'mounts' => ['id', 'storage_id', 'root_id', 'mount_id'], |
|
| 647 | + 'share_external' => ['id', 'parent'], |
|
| 648 | + 'storages' => ['numeric_id'], |
|
| 649 | + ]; |
|
| 650 | + |
|
| 651 | + $schema = new SchemaWrapper($this->db); |
|
| 652 | + $isSqlite = $this->db->getDatabasePlatform() instanceof SqlitePlatform; |
|
| 653 | + $pendingColumns = []; |
|
| 654 | + |
|
| 655 | + foreach ($tables as $tableName => $columns) { |
|
| 656 | + if (!$schema->hasTable($tableName)) { |
|
| 657 | + continue; |
|
| 658 | + } |
|
| 659 | + |
|
| 660 | + $table = $schema->getTable($tableName); |
|
| 661 | + foreach ($columns as $columnName) { |
|
| 662 | + $column = $table->getColumn($columnName); |
|
| 663 | + $isAutoIncrement = $column->getAutoincrement(); |
|
| 664 | + $isAutoIncrementOnSqlite = $isSqlite && $isAutoIncrement; |
|
| 665 | + if ($column->getType()->getName() !== Types::BIGINT && !$isAutoIncrementOnSqlite) { |
|
| 666 | + $pendingColumns[] = $tableName . '.' . $columnName; |
|
| 667 | + } |
|
| 668 | + } |
|
| 669 | + } |
|
| 670 | + |
|
| 671 | + return $pendingColumns; |
|
| 672 | + } |
|
| 673 | + |
|
| 674 | + protected function isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed(): bool { |
|
| 675 | + $objectStore = $this->config->getSystemValue('objectstore', null); |
|
| 676 | + $objectStoreMultibucket = $this->config->getSystemValue('objectstore_multibucket', null); |
|
| 677 | + |
|
| 678 | + if (!isset($objectStoreMultibucket) && !isset($objectStore)) { |
|
| 679 | + return true; |
|
| 680 | + } |
|
| 681 | + |
|
| 682 | + if (isset($objectStoreMultibucket['class']) && $objectStoreMultibucket['class'] !== 'OC\\Files\\ObjectStore\\S3') { |
|
| 683 | + return true; |
|
| 684 | + } |
|
| 685 | + |
|
| 686 | + if (isset($objectStore['class']) && $objectStore['class'] !== 'OC\\Files\\ObjectStore\\S3') { |
|
| 687 | + return true; |
|
| 688 | + } |
|
| 689 | + |
|
| 690 | + $tempPath = sys_get_temp_dir(); |
|
| 691 | + if (!is_dir($tempPath)) { |
|
| 692 | + $this->logger->error('Error while checking the temporary PHP path - it was not properly set to a directory. value: ' . $tempPath); |
|
| 693 | + return false; |
|
| 694 | + } |
|
| 695 | + $freeSpaceInTemp = disk_free_space($tempPath); |
|
| 696 | + if ($freeSpaceInTemp === false) { |
|
| 697 | + $this->logger->error('Error while checking the available disk space of temporary PHP path - no free disk space returned. temporary path: ' . $tempPath); |
|
| 698 | + return false; |
|
| 699 | + } |
|
| 700 | + |
|
| 701 | + $freeSpaceInTempInGB = $freeSpaceInTemp / 1024 / 1024 / 1024; |
|
| 702 | + if ($freeSpaceInTempInGB > 50) { |
|
| 703 | + return true; |
|
| 704 | + } |
|
| 705 | + |
|
| 706 | + $this->logger->warning('Checking the available space in the temporary path resulted in ' . round($freeSpaceInTempInGB, 1) . ' GB instead of the recommended 50GB. Path: ' . $tempPath); |
|
| 707 | + return false; |
|
| 708 | + } |
|
| 709 | + |
|
| 710 | + protected function imageMagickLacksSVGSupport(): bool { |
|
| 711 | + return extension_loaded('imagick') && count(\Imagick::queryFormats('SVG')) === 0; |
|
| 712 | + } |
|
| 713 | + |
|
| 714 | + /** |
|
| 715 | + * @return DataResponse |
|
| 716 | + */ |
|
| 717 | + public function check() { |
|
| 718 | + $phpDefaultCharset = new PhpDefaultCharset(); |
|
| 719 | + $phpOutputBuffering = new PhpOutputBuffering(); |
|
| 720 | + $legacySSEKeyFormat = new LegacySSEKeyFormat($this->l10n, $this->config, $this->urlGenerator); |
|
| 721 | + $checkUserCertificates = new CheckUserCertificates($this->l10n, $this->config, $this->urlGenerator); |
|
| 722 | + $supportedDatabases = new SupportedDatabase($this->l10n, $this->connection); |
|
| 723 | + |
|
| 724 | + return new DataResponse( |
|
| 725 | + [ |
|
| 726 | + 'isGetenvServerWorking' => !empty(getenv('PATH')), |
|
| 727 | + 'isReadOnlyConfig' => $this->isReadOnlyConfig(), |
|
| 728 | + 'hasValidTransactionIsolationLevel' => $this->hasValidTransactionIsolationLevel(), |
|
| 729 | + 'hasFileinfoInstalled' => $this->hasFileinfoInstalled(), |
|
| 730 | + 'hasWorkingFileLocking' => $this->hasWorkingFileLocking(), |
|
| 731 | + 'suggestedOverwriteCliURL' => $this->getSuggestedOverwriteCliURL(), |
|
| 732 | + 'cronInfo' => $this->getLastCronInfo(), |
|
| 733 | + 'cronErrors' => $this->getCronErrors(), |
|
| 734 | + 'serverHasInternetConnectionProblems' => $this->hasInternetConnectivityProblems(), |
|
| 735 | + 'isMemcacheConfigured' => $this->isMemcacheConfigured(), |
|
| 736 | + 'memcacheDocs' => $this->urlGenerator->linkToDocs('admin-performance'), |
|
| 737 | + 'isRandomnessSecure' => $this->isRandomnessSecure(), |
|
| 738 | + 'securityDocs' => $this->urlGenerator->linkToDocs('admin-security'), |
|
| 739 | + 'isUsedTlsLibOutdated' => $this->isUsedTlsLibOutdated(), |
|
| 740 | + 'phpSupported' => $this->isPhpSupported(), |
|
| 741 | + 'forwardedForHeadersWorking' => $this->forwardedForHeadersWorking(), |
|
| 742 | + 'reverseProxyDocs' => $this->urlGenerator->linkToDocs('admin-reverse-proxy'), |
|
| 743 | + 'isCorrectMemcachedPHPModuleInstalled' => $this->isCorrectMemcachedPHPModuleInstalled(), |
|
| 744 | + 'hasPassedCodeIntegrityCheck' => $this->checker->hasPassedCheck(), |
|
| 745 | + 'codeIntegrityCheckerDocumentation' => $this->urlGenerator->linkToDocs('admin-code-integrity'), |
|
| 746 | + 'isOpcacheProperlySetup' => $this->isOpcacheProperlySetup(), |
|
| 747 | + 'hasOpcacheLoaded' => $this->hasOpcacheLoaded(), |
|
| 748 | + 'phpOpcacheDocumentation' => $this->urlGenerator->linkToDocs('admin-php-opcache'), |
|
| 749 | + 'isSettimelimitAvailable' => $this->isSettimelimitAvailable(), |
|
| 750 | + 'hasFreeTypeSupport' => $this->hasFreeTypeSupport(), |
|
| 751 | + 'missingPrimaryKeys' => $this->hasMissingPrimaryKeys(), |
|
| 752 | + 'missingIndexes' => $this->hasMissingIndexes(), |
|
| 753 | + 'missingColumns' => $this->hasMissingColumns(), |
|
| 754 | + 'isSqliteUsed' => $this->isSqliteUsed(), |
|
| 755 | + 'databaseConversionDocumentation' => $this->urlGenerator->linkToDocs('admin-db-conversion'), |
|
| 756 | + 'isMemoryLimitSufficient' => $this->memoryInfo->isMemoryLimitSufficient(), |
|
| 757 | + 'appDirsWithDifferentOwner' => $this->getAppDirsWithDifferentOwner(), |
|
| 758 | + 'recommendedPHPModules' => $this->hasRecommendedPHPModules(), |
|
| 759 | + 'pendingBigIntConversionColumns' => $this->hasBigIntConversionPendingColumns(), |
|
| 760 | + 'isMysqlUsedWithoutUTF8MB4' => $this->isMysqlUsedWithoutUTF8MB4(), |
|
| 761 | + 'isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed' => $this->isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed(), |
|
| 762 | + 'reverseProxyGeneratedURL' => $this->urlGenerator->getAbsoluteURL('index.php'), |
|
| 763 | + 'imageMagickLacksSVGSupport' => $this->imageMagickLacksSVGSupport(), |
|
| 764 | + PhpDefaultCharset::class => ['pass' => $phpDefaultCharset->run(), 'description' => $phpDefaultCharset->description(), 'severity' => $phpDefaultCharset->severity()], |
|
| 765 | + PhpOutputBuffering::class => ['pass' => $phpOutputBuffering->run(), 'description' => $phpOutputBuffering->description(), 'severity' => $phpOutputBuffering->severity()], |
|
| 766 | + LegacySSEKeyFormat::class => ['pass' => $legacySSEKeyFormat->run(), 'description' => $legacySSEKeyFormat->description(), 'severity' => $legacySSEKeyFormat->severity(), 'linkToDocumentation' => $legacySSEKeyFormat->linkToDocumentation()], |
|
| 767 | + CheckUserCertificates::class => ['pass' => $checkUserCertificates->run(), 'description' => $checkUserCertificates->description(), 'severity' => $checkUserCertificates->severity(), 'elements' => $checkUserCertificates->elements()], |
|
| 768 | + 'isDefaultPhoneRegionSet' => $this->config->getSystemValueString('default_phone_region', '') !== '', |
|
| 769 | + SupportedDatabase::class => ['pass' => $supportedDatabases->run(), 'description' => $supportedDatabases->description(), 'severity' => $supportedDatabases->severity()], |
|
| 770 | + ] |
|
| 771 | + ); |
|
| 772 | + } |
|
| 773 | 773 | } |
@@ -38,75 +38,75 @@ |
||
| 38 | 38 | use OCP\IL10N; |
| 39 | 39 | |
| 40 | 40 | class SupportedDatabase { |
| 41 | - /** @var IL10N */ |
|
| 42 | - private $l10n; |
|
| 43 | - /** @var IDBConnection */ |
|
| 44 | - private $connection; |
|
| 41 | + /** @var IL10N */ |
|
| 42 | + private $l10n; |
|
| 43 | + /** @var IDBConnection */ |
|
| 44 | + private $connection; |
|
| 45 | 45 | |
| 46 | - private $checked = false; |
|
| 47 | - private $description = ''; |
|
| 46 | + private $checked = false; |
|
| 47 | + private $description = ''; |
|
| 48 | 48 | |
| 49 | - public function __construct(IL10N $l10n, IDBConnection $connection) { |
|
| 50 | - $this->l10n = $l10n; |
|
| 51 | - $this->connection = $connection; |
|
| 52 | - } |
|
| 49 | + public function __construct(IL10N $l10n, IDBConnection $connection) { |
|
| 50 | + $this->l10n = $l10n; |
|
| 51 | + $this->connection = $connection; |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - public function check() { |
|
| 55 | - if ($this->checked === true) { |
|
| 56 | - return; |
|
| 57 | - } |
|
| 58 | - $this->checked = true; |
|
| 54 | + public function check() { |
|
| 55 | + if ($this->checked === true) { |
|
| 56 | + return; |
|
| 57 | + } |
|
| 58 | + $this->checked = true; |
|
| 59 | 59 | |
| 60 | - switch (get_class($this->connection->getDatabasePlatform())) { |
|
| 61 | - case MySQL80Platform::class: # extends MySQL57Platform |
|
| 62 | - case MySQL57Platform::class: # extends MySQLPlatform |
|
| 63 | - case MariaDb1027Platform::class: # extends MySQLPlatform |
|
| 64 | - case MySqlPlatform::class: |
|
| 65 | - $result = $this->connection->prepare('SHOW VARIABLES LIKE "version";'); |
|
| 66 | - $result->execute(); |
|
| 67 | - $row = $result->fetch(); |
|
| 68 | - $version = strtolower($row['Value']); |
|
| 60 | + switch (get_class($this->connection->getDatabasePlatform())) { |
|
| 61 | + case MySQL80Platform::class: # extends MySQL57Platform |
|
| 62 | + case MySQL57Platform::class: # extends MySQLPlatform |
|
| 63 | + case MariaDb1027Platform::class: # extends MySQLPlatform |
|
| 64 | + case MySqlPlatform::class: |
|
| 65 | + $result = $this->connection->prepare('SHOW VARIABLES LIKE "version";'); |
|
| 66 | + $result->execute(); |
|
| 67 | + $row = $result->fetch(); |
|
| 68 | + $version = strtolower($row['Value']); |
|
| 69 | 69 | |
| 70 | - if (strpos($version, 'mariadb') !== false) { |
|
| 71 | - if (version_compare($version, '10.2', '<')) { |
|
| 72 | - $this->description = $this->l10n->t('MariaDB version "%s" is used. Nextcloud 21 will no longer support this version and requires MariaDB 10.2 or higher.', $row['Value']); |
|
| 73 | - return; |
|
| 74 | - } |
|
| 75 | - } else { |
|
| 76 | - if (version_compare($version, '8', '<')) { |
|
| 77 | - $this->description = $this->l10n->t('MySQL version "%s" is used. Nextcloud 21 will no longer support this version and requires MySQL 8 or higher.', $row['Value']); |
|
| 78 | - return; |
|
| 79 | - } |
|
| 80 | - } |
|
| 81 | - break; |
|
| 82 | - case SqlitePlatform::class: |
|
| 83 | - break; |
|
| 84 | - case PostgreSQL100Platform::class: # extends PostgreSQL94Platform |
|
| 85 | - case PostgreSQL94Platform::class: |
|
| 86 | - $result = $this->connection->prepare('SHOW server_version;'); |
|
| 87 | - $result->execute(); |
|
| 88 | - $row = $result->fetch(); |
|
| 89 | - if (version_compare($row['server_version'], '9.6', '<')) { |
|
| 90 | - $this->description = $this->l10n->t('PostgreSQL version "%s" is used. Nextcloud 21 will no longer support this version and requires PostgreSQL 9.6 or higher.', $row['server_version']); |
|
| 91 | - return; |
|
| 92 | - } |
|
| 93 | - break; |
|
| 94 | - case OraclePlatform::class: |
|
| 95 | - break; |
|
| 96 | - } |
|
| 97 | - } |
|
| 70 | + if (strpos($version, 'mariadb') !== false) { |
|
| 71 | + if (version_compare($version, '10.2', '<')) { |
|
| 72 | + $this->description = $this->l10n->t('MariaDB version "%s" is used. Nextcloud 21 will no longer support this version and requires MariaDB 10.2 or higher.', $row['Value']); |
|
| 73 | + return; |
|
| 74 | + } |
|
| 75 | + } else { |
|
| 76 | + if (version_compare($version, '8', '<')) { |
|
| 77 | + $this->description = $this->l10n->t('MySQL version "%s" is used. Nextcloud 21 will no longer support this version and requires MySQL 8 or higher.', $row['Value']); |
|
| 78 | + return; |
|
| 79 | + } |
|
| 80 | + } |
|
| 81 | + break; |
|
| 82 | + case SqlitePlatform::class: |
|
| 83 | + break; |
|
| 84 | + case PostgreSQL100Platform::class: # extends PostgreSQL94Platform |
|
| 85 | + case PostgreSQL94Platform::class: |
|
| 86 | + $result = $this->connection->prepare('SHOW server_version;'); |
|
| 87 | + $result->execute(); |
|
| 88 | + $row = $result->fetch(); |
|
| 89 | + if (version_compare($row['server_version'], '9.6', '<')) { |
|
| 90 | + $this->description = $this->l10n->t('PostgreSQL version "%s" is used. Nextcloud 21 will no longer support this version and requires PostgreSQL 9.6 or higher.', $row['server_version']); |
|
| 91 | + return; |
|
| 92 | + } |
|
| 93 | + break; |
|
| 94 | + case OraclePlatform::class: |
|
| 95 | + break; |
|
| 96 | + } |
|
| 97 | + } |
|
| 98 | 98 | |
| 99 | - public function description(): string { |
|
| 100 | - $this->check(); |
|
| 101 | - return $this->description; |
|
| 102 | - } |
|
| 99 | + public function description(): string { |
|
| 100 | + $this->check(); |
|
| 101 | + return $this->description; |
|
| 102 | + } |
|
| 103 | 103 | |
| 104 | - public function severity(): string { |
|
| 105 | - return 'info'; |
|
| 106 | - } |
|
| 104 | + public function severity(): string { |
|
| 105 | + return 'info'; |
|
| 106 | + } |
|
| 107 | 107 | |
| 108 | - public function run(): bool { |
|
| 109 | - $this->check(); |
|
| 110 | - return $this->description === ''; |
|
| 111 | - } |
|
| 108 | + public function run(): bool { |
|
| 109 | + $this->check(); |
|
| 110 | + return $this->description === ''; |
|
| 111 | + } |
|
| 112 | 112 | } |