CheckSetupControllerTest.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2015, ownCloud, Inc.
  4. *
  5. * @author Bjoern Schiessle <bjoern@schiessle.org>
  6. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  7. * @author Daniel Kesselberg <mail@danielkesselberg.de>
  8. * @author Joas Schilling <coding@schilljs.com>
  9. * @author John Molakvoæ <skjnldsv@protonmail.com>
  10. * @author Lukas Reschke <lukas@statuscode.ch>
  11. * @author Michael Weimann <mail@michael-weimann.eu>
  12. * @author Morris Jobke <hey@morrisjobke.de>
  13. * @author nhirokinet <nhirokinet@nhiroki.net>
  14. * @author Robin Appelman <robin@icewind.nl>
  15. * @author Robin McCorkell <robin@mccorkell.me.uk>
  16. * @author Roeland Jago Douma <roeland@famdouma.nl>
  17. * @author Sylvia van Os <sylvia@hackerchick.me>
  18. * @author Timo Förster <tfoerster@webfoersterei.de>
  19. *
  20. * @license AGPL-3.0
  21. *
  22. * This code is free software: you can redistribute it and/or modify
  23. * it under the terms of the GNU Affero General Public License, version 3,
  24. * as published by the Free Software Foundation.
  25. *
  26. * This program is distributed in the hope that it will be useful,
  27. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  28. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  29. * GNU Affero General Public License for more details.
  30. *
  31. * You should have received a copy of the GNU Affero General Public License, version 3,
  32. * along with this program. If not, see <http://www.gnu.org/licenses/>
  33. *
  34. */
  35. namespace OCA\Settings\Tests\Controller;
  36. use OC\IntegrityCheck\Checker;
  37. use OCA\Settings\Controller\CheckSetupController;
  38. use OCP\AppFramework\Http;
  39. use OCP\AppFramework\Http\DataDisplayResponse;
  40. use OCP\AppFramework\Http\DataResponse;
  41. use OCP\AppFramework\Http\RedirectResponse;
  42. use OCP\IConfig;
  43. use OCP\IL10N;
  44. use OCP\IRequest;
  45. use OCP\IURLGenerator;
  46. use OCP\SetupCheck\ISetupCheckManager;
  47. use PHPUnit\Framework\MockObject\MockObject;
  48. use Psr\Log\LoggerInterface;
  49. use Test\TestCase;
  50. /**
  51. * Class CheckSetupControllerTest
  52. *
  53. * @backupStaticAttributes
  54. * @package Tests\Settings\Controller
  55. */
  56. class CheckSetupControllerTest extends TestCase {
  57. /** @var CheckSetupController | \PHPUnit\Framework\MockObject\MockObject */
  58. private $checkSetupController;
  59. /** @var IRequest | \PHPUnit\Framework\MockObject\MockObject */
  60. private $request;
  61. /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
  62. private $config;
  63. /** @var IURLGenerator | \PHPUnit\Framework\MockObject\MockObject */
  64. private $urlGenerator;
  65. /** @var IL10N | \PHPUnit\Framework\MockObject\MockObject */
  66. private $l10n;
  67. /** @var LoggerInterface */
  68. private $logger;
  69. /** @var Checker|\PHPUnit\Framework\MockObject\MockObject */
  70. private $checker;
  71. /** @var ISetupCheckManager|MockObject */
  72. private $setupCheckManager;
  73. protected function setUp(): void {
  74. parent::setUp();
  75. $this->request = $this->getMockBuilder(IRequest::class)
  76. ->disableOriginalConstructor()->getMock();
  77. $this->config = $this->getMockBuilder(IConfig::class)
  78. ->disableOriginalConstructor()->getMock();
  79. $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)
  80. ->disableOriginalConstructor()->getMock();
  81. $this->l10n = $this->getMockBuilder(IL10N::class)
  82. ->disableOriginalConstructor()->getMock();
  83. $this->l10n->expects($this->any())
  84. ->method('t')
  85. ->willReturnCallback(function ($message, array $replace) {
  86. return vsprintf($message, $replace);
  87. });
  88. $this->checker = $this->getMockBuilder('\OC\IntegrityCheck\Checker')
  89. ->disableOriginalConstructor()->getMock();
  90. $this->logger = $this->getMockBuilder(LoggerInterface::class)->getMock();
  91. $this->setupCheckManager = $this->createMock(ISetupCheckManager::class);
  92. $this->checkSetupController = $this->getMockBuilder(CheckSetupController::class)
  93. ->setConstructorArgs([
  94. 'settings',
  95. $this->request,
  96. $this->config,
  97. $this->urlGenerator,
  98. $this->l10n,
  99. $this->checker,
  100. $this->logger,
  101. $this->setupCheckManager,
  102. ])
  103. ->setMethods([
  104. 'getCurlVersion',
  105. 'isPhpOutdated',
  106. 'isPHPMailerUsed',
  107. ])->getMock();
  108. }
  109. public function testCheck() {
  110. $this->config->expects($this->any())
  111. ->method('getAppValue')
  112. ->willReturnMap([
  113. ['files_external', 'user_certificate_scan', '', '["a", "b"]'],
  114. ['dav', 'needs_system_address_book_sync', 'no', 'no'],
  115. ]);
  116. $this->config->expects($this->any())
  117. ->method('getSystemValue')
  118. ->willReturnMap([
  119. ['connectivity_check_domains', ['www.nextcloud.com', 'www.startpage.com', 'www.eff.org', 'www.edri.org'], ['www.nextcloud.com', 'www.startpage.com', 'www.eff.org', 'www.edri.org']],
  120. ['memcache.local', null, 'SomeProvider'],
  121. ['has_internet_connection', true, true],
  122. ['appstoreenabled', true, false],
  123. ]);
  124. $this->request->expects($this->never())
  125. ->method('getHeader');
  126. $this->urlGenerator->method('linkToDocs')
  127. ->willReturnCallback(function (string $key): string {
  128. if ($key === 'admin-performance') {
  129. return 'http://docs.example.org/server/go.php?to=admin-performance';
  130. }
  131. if ($key === 'admin-security') {
  132. return 'https://docs.example.org/server/8.1/admin_manual/configuration_server/hardening.html';
  133. }
  134. if ($key === 'admin-reverse-proxy') {
  135. return 'reverse-proxy-doc-link';
  136. }
  137. if ($key === 'admin-code-integrity') {
  138. return 'http://docs.example.org/server/go.php?to=admin-code-integrity';
  139. }
  140. if ($key === 'admin-db-conversion') {
  141. return 'http://docs.example.org/server/go.php?to=admin-db-conversion';
  142. }
  143. return '';
  144. });
  145. $this->urlGenerator->method('getAbsoluteURL')
  146. ->willReturnCallback(function (string $url): string {
  147. if ($url === 'index.php/settings/admin') {
  148. return 'https://server/index.php/settings/admin';
  149. }
  150. if ($url === 'index.php') {
  151. return 'https://server/index.php';
  152. }
  153. return '';
  154. });
  155. $expected = new DataResponse(
  156. [
  157. 'generic' => [],
  158. ]
  159. );
  160. $this->assertEquals($expected, $this->checkSetupController->check());
  161. }
  162. public function testRescanFailedIntegrityCheck() {
  163. $this->checker
  164. ->expects($this->once())
  165. ->method('runInstanceVerification');
  166. $this->urlGenerator
  167. ->expects($this->once())
  168. ->method('linkToRoute')
  169. ->with('settings.AdminSettings.index')
  170. ->willReturn('/admin');
  171. $expected = new RedirectResponse('/admin');
  172. $this->assertEquals($expected, $this->checkSetupController->rescanFailedIntegrityCheck());
  173. }
  174. public function testGetFailedIntegrityCheckDisabled() {
  175. $this->checker
  176. ->expects($this->once())
  177. ->method('isCodeCheckEnforced')
  178. ->willReturn(false);
  179. $expected = new DataDisplayResponse('Integrity checker has been disabled. Integrity cannot be verified.');
  180. $this->assertEquals($expected, $this->checkSetupController->getFailedIntegrityCheckFiles());
  181. }
  182. public function testGetFailedIntegrityCheckFilesWithNoErrorsFound() {
  183. $this->checker
  184. ->expects($this->once())
  185. ->method('isCodeCheckEnforced')
  186. ->willReturn(true);
  187. $this->checker
  188. ->expects($this->once())
  189. ->method('getResults')
  190. ->willReturn([]);
  191. $expected = new DataDisplayResponse(
  192. 'No errors have been found.',
  193. Http::STATUS_OK,
  194. [
  195. 'Content-Type' => 'text/plain',
  196. ]
  197. );
  198. $this->assertEquals($expected, $this->checkSetupController->getFailedIntegrityCheckFiles());
  199. }
  200. public function testGetFailedIntegrityCheckFilesWithSomeErrorsFound() {
  201. $this->checker
  202. ->expects($this->once())
  203. ->method('isCodeCheckEnforced')
  204. ->willReturn(true);
  205. $this->checker
  206. ->expects($this->once())
  207. ->method('getResults')
  208. ->willReturn([ 'core' => [ 'EXTRA_FILE' => ['/testfile' => []], 'INVALID_HASH' => [ '/.idea/workspace.xml' => [ 'expected' => 'f1c5e2630d784bc9cb02d5a28f55d6f24d06dae2a0fee685f3c2521b050955d9d452769f61454c9ddfa9c308146ade10546cfa829794448eaffbc9a04a29d216', 'current' => 'ce08bf30bcbb879a18b49239a9bec6b8702f52452f88a9d32142cad8d2494d5735e6bfa0d8642b2762c62ca5be49f9bf4ec231d4a230559d4f3e2c471d3ea094', ], '/lib/private/integritycheck/checker.php' => [ 'expected' => 'c5a03bacae8dedf8b239997901ba1fffd2fe51271d13a00cc4b34b09cca5176397a89fc27381cbb1f72855fa18b69b6f87d7d5685c3b45aee373b09be54742ea', 'current' => '88a3a92c11db91dec1ac3be0e1c87f862c95ba6ffaaaa3f2c3b8f682187c66f07af3a3b557a868342ef4a271218fe1c1e300c478e6c156c5955ed53c40d06585', ], '/settings/controller/checksetupcontroller.php' => [ 'expected' => '3e1de26ce93c7bfe0ede7c19cb6c93cadc010340225b375607a7178812e9de163179b0dc33809f451e01f491d93f6f5aaca7929685d21594cccf8bda732327c4', 'current' => '09563164f9904a837f9ca0b5f626db56c838e5098e0ccc1d8b935f68fa03a25c5ec6f6b2d9e44a868e8b85764dafd1605522b4af8db0ae269d73432e9a01e63a', ], ], ], 'bookmarks' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'dav' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'encryption' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'federation' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_antivirus' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_drop' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_pdfviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_sharing' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_trashbin' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_versions' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_videoviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'firstrunwizard' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'gitsmart' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'logreader' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature could not get verified.', ], ], 'password_policy' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'provisioning_api' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'sketch' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'threatblock' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'two_factor_auth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_ldap' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_shibboleth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], ]);
  209. $expected = new DataDisplayResponse(
  210. 'Technical information
  211. =====================
  212. The following list covers which files have failed the integrity check. Please read
  213. the previous linked documentation to learn more about the errors and how to fix
  214. them.
  215. Results
  216. =======
  217. - core
  218. - EXTRA_FILE
  219. - /testfile
  220. - INVALID_HASH
  221. - /.idea/workspace.xml
  222. - /lib/private/integritycheck/checker.php
  223. - /settings/controller/checksetupcontroller.php
  224. - bookmarks
  225. - EXCEPTION
  226. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  227. - Signature data not found.
  228. - dav
  229. - EXCEPTION
  230. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  231. - Signature data not found.
  232. - encryption
  233. - EXCEPTION
  234. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  235. - Signature data not found.
  236. - external
  237. - EXCEPTION
  238. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  239. - Signature data not found.
  240. - federation
  241. - EXCEPTION
  242. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  243. - Signature data not found.
  244. - files
  245. - EXCEPTION
  246. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  247. - Signature data not found.
  248. - files_antivirus
  249. - EXCEPTION
  250. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  251. - Signature data not found.
  252. - files_drop
  253. - EXCEPTION
  254. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  255. - Signature data not found.
  256. - files_external
  257. - EXCEPTION
  258. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  259. - Signature data not found.
  260. - files_pdfviewer
  261. - EXCEPTION
  262. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  263. - Signature data not found.
  264. - files_sharing
  265. - EXCEPTION
  266. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  267. - Signature data not found.
  268. - files_trashbin
  269. - EXCEPTION
  270. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  271. - Signature data not found.
  272. - files_versions
  273. - EXCEPTION
  274. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  275. - Signature data not found.
  276. - files_videoviewer
  277. - EXCEPTION
  278. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  279. - Signature data not found.
  280. - firstrunwizard
  281. - EXCEPTION
  282. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  283. - Signature data not found.
  284. - gitsmart
  285. - EXCEPTION
  286. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  287. - Signature data not found.
  288. - logreader
  289. - EXCEPTION
  290. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  291. - Signature could not get verified.
  292. - password_policy
  293. - EXCEPTION
  294. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  295. - Signature data not found.
  296. - provisioning_api
  297. - EXCEPTION
  298. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  299. - Signature data not found.
  300. - sketch
  301. - EXCEPTION
  302. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  303. - Signature data not found.
  304. - threatblock
  305. - EXCEPTION
  306. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  307. - Signature data not found.
  308. - two_factor_auth
  309. - EXCEPTION
  310. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  311. - Signature data not found.
  312. - user_ldap
  313. - EXCEPTION
  314. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  315. - Signature data not found.
  316. - user_shibboleth
  317. - EXCEPTION
  318. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  319. - Signature data not found.
  320. Raw output
  321. ==========
  322. Array
  323. (
  324. [core] => Array
  325. (
  326. [EXTRA_FILE] => Array
  327. (
  328. [/testfile] => Array
  329. (
  330. )
  331. )
  332. [INVALID_HASH] => Array
  333. (
  334. [/.idea/workspace.xml] => Array
  335. (
  336. [expected] => f1c5e2630d784bc9cb02d5a28f55d6f24d06dae2a0fee685f3c2521b050955d9d452769f61454c9ddfa9c308146ade10546cfa829794448eaffbc9a04a29d216
  337. [current] => ce08bf30bcbb879a18b49239a9bec6b8702f52452f88a9d32142cad8d2494d5735e6bfa0d8642b2762c62ca5be49f9bf4ec231d4a230559d4f3e2c471d3ea094
  338. )
  339. [/lib/private/integritycheck/checker.php] => Array
  340. (
  341. [expected] => c5a03bacae8dedf8b239997901ba1fffd2fe51271d13a00cc4b34b09cca5176397a89fc27381cbb1f72855fa18b69b6f87d7d5685c3b45aee373b09be54742ea
  342. [current] => 88a3a92c11db91dec1ac3be0e1c87f862c95ba6ffaaaa3f2c3b8f682187c66f07af3a3b557a868342ef4a271218fe1c1e300c478e6c156c5955ed53c40d06585
  343. )
  344. [/settings/controller/checksetupcontroller.php] => Array
  345. (
  346. [expected] => 3e1de26ce93c7bfe0ede7c19cb6c93cadc010340225b375607a7178812e9de163179b0dc33809f451e01f491d93f6f5aaca7929685d21594cccf8bda732327c4
  347. [current] => 09563164f9904a837f9ca0b5f626db56c838e5098e0ccc1d8b935f68fa03a25c5ec6f6b2d9e44a868e8b85764dafd1605522b4af8db0ae269d73432e9a01e63a
  348. )
  349. )
  350. )
  351. [bookmarks] => Array
  352. (
  353. [EXCEPTION] => Array
  354. (
  355. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  356. [message] => Signature data not found.
  357. )
  358. )
  359. [dav] => Array
  360. (
  361. [EXCEPTION] => Array
  362. (
  363. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  364. [message] => Signature data not found.
  365. )
  366. )
  367. [encryption] => Array
  368. (
  369. [EXCEPTION] => Array
  370. (
  371. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  372. [message] => Signature data not found.
  373. )
  374. )
  375. [external] => Array
  376. (
  377. [EXCEPTION] => Array
  378. (
  379. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  380. [message] => Signature data not found.
  381. )
  382. )
  383. [federation] => Array
  384. (
  385. [EXCEPTION] => Array
  386. (
  387. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  388. [message] => Signature data not found.
  389. )
  390. )
  391. [files] => Array
  392. (
  393. [EXCEPTION] => Array
  394. (
  395. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  396. [message] => Signature data not found.
  397. )
  398. )
  399. [files_antivirus] => Array
  400. (
  401. [EXCEPTION] => Array
  402. (
  403. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  404. [message] => Signature data not found.
  405. )
  406. )
  407. [files_drop] => Array
  408. (
  409. [EXCEPTION] => Array
  410. (
  411. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  412. [message] => Signature data not found.
  413. )
  414. )
  415. [files_external] => Array
  416. (
  417. [EXCEPTION] => Array
  418. (
  419. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  420. [message] => Signature data not found.
  421. )
  422. )
  423. [files_pdfviewer] => Array
  424. (
  425. [EXCEPTION] => Array
  426. (
  427. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  428. [message] => Signature data not found.
  429. )
  430. )
  431. [files_sharing] => Array
  432. (
  433. [EXCEPTION] => Array
  434. (
  435. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  436. [message] => Signature data not found.
  437. )
  438. )
  439. [files_trashbin] => Array
  440. (
  441. [EXCEPTION] => Array
  442. (
  443. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  444. [message] => Signature data not found.
  445. )
  446. )
  447. [files_versions] => Array
  448. (
  449. [EXCEPTION] => Array
  450. (
  451. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  452. [message] => Signature data not found.
  453. )
  454. )
  455. [files_videoviewer] => Array
  456. (
  457. [EXCEPTION] => Array
  458. (
  459. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  460. [message] => Signature data not found.
  461. )
  462. )
  463. [firstrunwizard] => Array
  464. (
  465. [EXCEPTION] => Array
  466. (
  467. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  468. [message] => Signature data not found.
  469. )
  470. )
  471. [gitsmart] => Array
  472. (
  473. [EXCEPTION] => Array
  474. (
  475. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  476. [message] => Signature data not found.
  477. )
  478. )
  479. [logreader] => Array
  480. (
  481. [EXCEPTION] => Array
  482. (
  483. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  484. [message] => Signature could not get verified.
  485. )
  486. )
  487. [password_policy] => Array
  488. (
  489. [EXCEPTION] => Array
  490. (
  491. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  492. [message] => Signature data not found.
  493. )
  494. )
  495. [provisioning_api] => Array
  496. (
  497. [EXCEPTION] => Array
  498. (
  499. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  500. [message] => Signature data not found.
  501. )
  502. )
  503. [sketch] => Array
  504. (
  505. [EXCEPTION] => Array
  506. (
  507. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  508. [message] => Signature data not found.
  509. )
  510. )
  511. [threatblock] => Array
  512. (
  513. [EXCEPTION] => Array
  514. (
  515. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  516. [message] => Signature data not found.
  517. )
  518. )
  519. [two_factor_auth] => Array
  520. (
  521. [EXCEPTION] => Array
  522. (
  523. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  524. [message] => Signature data not found.
  525. )
  526. )
  527. [user_ldap] => Array
  528. (
  529. [EXCEPTION] => Array
  530. (
  531. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  532. [message] => Signature data not found.
  533. )
  534. )
  535. [user_shibboleth] => Array
  536. (
  537. [EXCEPTION] => Array
  538. (
  539. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  540. [message] => Signature data not found.
  541. )
  542. )
  543. )
  544. ',
  545. Http::STATUS_OK,
  546. [
  547. 'Content-Type' => 'text/plain',
  548. ]
  549. );
  550. $this->assertEquals($expected, $this->checkSetupController->getFailedIntegrityCheckFiles());
  551. }
  552. }