Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrity fails if mime type list is extended #10411

Closed
MorrisJobke opened this issue Jul 26, 2018 · 8 comments · Fixed by #15810
Closed

Integrity fails if mime type list is extended #10411

MorrisJobke opened this issue Jul 26, 2018 · 8 comments · Fixed by #15810
Assignees
Labels
enhancement good first issue Small tasks with clear documentation about how and in which place you need to fix things in. papercut Annoying recurring issue with possibly simple fix.
Milestone

Comments

@MorrisJobke
Copy link
Member

  • extend mimetype list
  • run occ maintenance:mimetype:update-js
  • check integrity
  • expected: no issues
  • actual: integrity checks don't pass

@nickvergessen @rullzer Ideas how to prevent this? Exclude the file from the check once we see that there are mimetypes added?

@MorrisJobke MorrisJobke added enhancement papercut Annoying recurring issue with possibly simple fix. labels Jul 26, 2018
@nextcloud-bot

This comment has been minimized.

@nickvergessen
Copy link
Member

I'm a bit drawn a part, because it is actually necessary and good information that the file is "non-default". But since this spams a notification all the time you visit the web UI 🙀

@MorrisJobke MorrisJobke added this to the Nextcloud 15 milestone Aug 29, 2018
@MorrisJobke MorrisJobke self-assigned this Oct 29, 2018
@MorrisJobke MorrisJobke added good first issue Small tasks with clear documentation about how and in which place you need to fix things in. Hacktoberfest labels Oct 29, 2018
@MorrisJobke
Copy link
Member Author

I would say, that this is less critical now since #12418 is in.

@MorrisJobke
Copy link
Member Author

The code change needs to look similar to this (and also is then placed there):

// Fixes for the updater as shipped with ownCloud 9.0.x: The updater is
// replaced after the code integrity check is performed.
//
// Due to this reason we exclude the whole updater/ folder from the code
// integrity check.
if($basePath === $this->environmentHelper->getServerRoot()) {
foreach($expectedHashes as $fileName => $hash) {
if(strpos($fileName, 'updater/') === 0) {
unset($expectedHashes[$fileName]);
}
}
}

This is how a similar way looked before for the modified .htaccess file:

c6a69ba#diff-8c88c803f1798e69a75cd73cbaba2a12L183

Tests can be found in here:

public function testVerifyCoreSignatureWithValidModifiedHtaccessSignatureData() {
$this->environmentHelper
->expects($this->once())
->method('getChannel')
->will($this->returnValue('stable'));
$this->config
->expects($this->any())
->method('getSystemValue')
->with('integrity.check.disabled', false)
->will($this->returnValue(false));
$this->environmentHelper
->expects($this->any())
->method('getServerRoot')
->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/htaccessWithValidModifiedContent'));
$signatureDataFile = '{
"hashes": {
".htaccess": "7e6a7a4d8ee4f3fbc45dd579407c643471575a9d127d1c75f6d0a49e80766c3c587104b2139ef76d2a4bffce3f45777900605aaa49519c9532909b71e5030227",
"subfolder\/.htaccess": "2c57b1e25050e11dc3ae975832f378c452159f7b69f818e47eeeafadd6ba568517461dcb4d843b90b906cd7c89d161bc1b89dff8e3ae0eb6f5088508c47befd1"
},
"signature": "YVwQvl9Dh8UebCumfgzFxfz3NiZJLmYG8oJVTfEBhulI4KXBnTG1jZTprf4XxG2XIriEYAZXsoXpu9xWsUFe9QfdncwoEpqJtGq7l6aVDTofX5Be5b03MQFJr4cflgllqW77QZ84D9O9qWF\/vNDAofXcwrzT04CxLDhyQgTCgYUnRjG9pnuP\/gtbDKbTjRvxhTyfg3T0Phv1+XAvpTPnH2q5A+1+LmiqziUJ1sMipsKo+jQP614eCi9qjmqhHIgLRgcuOBvsi4g5WUcdcAIZ6qLt5gm2Y3r6rKNVchosU9ZydMUTfjuejDbVwE2fNH5UUnV57fQBxwg9CfX7iFHqKv1bfv5Zviu12paShgWCB12uR3iH\/3lmTJn8K5Xqit3G4eymFaJ5IChdUThBp\/jhQSI2r8sPcZDYSJ\/UZKuFnezFdKhEBd5hMXe8aKAd6ijGDjLARksFuqpi1sS8llC5K1Q+DzktSL\/o64TY4Vuvykiwe\/BAk2SkL9voOtrvU7vfDBcuCPbDJnSBBC0ESpcXeClTBIn6xZ9WaxqoS7sinE\/kUwtWsRd04I7d79\/ouotyNb+mBhTuRsZT12p\/gn4JHXXNUAIpTwchYzGxbfNJ4kxnYBFZWVmvsSqOLFZu1yi5BP3ktA9yhFyWIa5659azRFEKRdXpVHtQVa4IgdhxEqA=",
"certificate": "-----BEGIN CERTIFICATE-----\r\nMIIEvjCCAqagAwIBAgIUc\/0FxYrsgSs9rDxp03EJmbjN0NwwDQYJKoZIhvcNAQEF\r\nBQAwIzEhMB8GA1UECgwYb3duQ2xvdWQgQ29kZSBTaWduaW5nIENBMB4XDTE1MTEw\r\nMzIxMDMzM1oXDTE2MTEwMzIxMDMzM1owDzENMAsGA1UEAwwEY29yZTCCAiIwDQYJ\r\nKoZIhvcNAQEBBQADggIPADCCAgoCggIBALb6EgHpkAqZbO5vRO8XSh7G7XGWHw5s\r\niOf4RwPXR6SE9bWZEm\/b72SfWk\/\/J6AbrD8WiOzBuT\/ODy6k5T1arEdHO+Pux0W1\r\nMxYJJI4kH74KKgMpC0SB0Rt+8WrMqV1r3hhJ46df6Xr\/xolP3oD+eLbShPcblhdS\r\nVtkZEkoev8Sh6L2wDCeHDyPxzvj1w2dTdGVO9Kztn0xIlyfEBakqvBWtcxyi3Ln0\r\nklnxlMx3tPDUE4kqvpia9qNiB1AN2PV93eNr5\/2riAzIssMFSCarWCx0AKYb54+d\r\nxLpcYFyqPJ0ydBCkF78DD45RCZet6PNYkdzgbqlUWEGGomkuDoJbBg4wzgzO0D77\r\nH87KFhYW8tKFFvF1V3AHl\/sFQ9tDHaxM9Y0pZ2jPp\/ccdiqnmdkBxBDqsiRvHvVB\r\nCn6qpb4vWGFC7vHOBfYspmEL1zLlKXZv3ezMZEZw7O9ZvUP3VO\/wAtd2vUW8UFiq\r\ns2v1QnNLN6jNh51obcwmrBvWhJy9vQIdtIjQbDxqWTHh1zUSrw9wrlklCBZ\/zrM0\r\ni8nfCFwTxWRxp3H9KoECzO\/zS5R5KIS7s3\/wq\/w9T2Ie4rcecgXwDizwnn0C\/aKc\r\nbDIjujpL1s9HO05pcD\/V3wKcPZ1izymBkmMyIbL52iRVN5FTVHeZdXPpFuq+CTQJ\r\nQ238lC+A\/KOVAgMBAAEwDQYJKoZIhvcNAQEFBQADggIBAGoKTnh8RfJV4sQItVC2\r\nAvfJagkrIqZ3iiQTUBQGTKBsTnAqE1H7QgUSV9vSd+8rgvHkyZsRjmtyR1e3A6Ji\r\noNCXUbExC\/0iCPUqdHZIVb+Lc\/vWuv4ByFMybGPydgtLoEUX2ZrKFWmcgZFDUSRd\r\n9Uj26vtUhCC4bU4jgu6hIrR9IuxOBLQUxGTRZyAcXvj7obqRAEZwFAKQgFpfpqTb\r\nH+kjcbZSaAlLVSF7vBc1syyI8RGYbqpwvtREqJtl5IEIwe6huEqJ3zPnlP2th\/55\r\ncf3Fovj6JJgbb9XFxrdnsOsDOu\/tpnaRWlvv5ib4+SzG5wWFT5UUEo4Wg2STQiiX\r\nuVSRQxK1LE1yg84bs3NZk9FSQh4B8vZVuRr5FaJsZZkwlFlhRO\/\/+TJtXRbyNgsf\r\noMRZGi8DLGU2SGEAHcRH\/QZHq\/XDUWVzdxrSBYcy7GSpT7UDVzGv1rEJUrn5veP1\r\n0KmauAqtiIaYRm4f6YBsn0INcZxzIPZ0p8qFtVZBPeHhvQtvOt0iXI\/XUxEWOa2F\r\nK2EqhErgMK\/N07U1JJJay5tYZRtvkGq46oP\/5kQG8hYST0MDK6VihJoPpvCmAm4E\r\npEYKQ96x6A4EH9Y9mZlYozH\/eqmxPbTK8n89\/p7Ydun4rI+B2iiLnY8REWWy6+UQ\r\nV204fGUkJqW5CrKy3P3XvY9X\r\n-----END CERTIFICATE-----"
}';
$this->fileAccessHelper
->expects($this->at(0))
->method('file_get_contents')
->with(
\OC::$SERVERROOT . '/tests/data/integritycheck/htaccessWithValidModifiedContent/core/signature.json'
)
->will($this->returnValue($signatureDataFile));
$this->fileAccessHelper
->expects($this->at(1))
->method('file_get_contents')
->with(
\OC::$SERVERROOT . '/tests/data/integritycheck/htaccessWithValidModifiedContent/resources/codesigning/root.crt'
)
->will($this->returnValue(file_get_contents(__DIR__ .'/../../data/integritycheck/root.crt')));
$this->assertSame([], $this->checker->verifyCoreSignature());
}

Steps:

  • in lib/private/IntegrityCheck/Checker.php the change of the custom mime type needs to be reverted on a temporary file
  • this temporary file is hashed for the signature check
  • signature should then be correct

cc @xh3n1

@cClaude
Copy link

cClaude commented Aug 2, 2021

Still having this issue on 21.0.3

@MrRinkana
Copy link

I got this issue aswell after manually running the occ maintenance:mimetype:update-js on nextcloud 22.1.1.2.

- INVALID_HASH:
    - core/js/mimetypelist.js:

My admin setting/overview Security & setup warnings are timing out with "Error occurred while checking server setup", don't know if that is related. Here are some logs that seem to have to do with integrity checking. They might have come from me running app:check-integrity $appname. Sorry if these are not relevant.

{"reqId":"EfVsYwUkS9xXECW35qKL","level":3,"time":"2021-09-16T11:23:56+02:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/html/nextcloud/apps/files_texteditor/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","userAgent":"--","version":"22.1.1.2","exception":{"Exception":"Error","Message":"file_get_contents(/var/www/html/nextcloud/apps/files_texteditor/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php","line":44,"function":"file_get_contents"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":329,"function":"file_get_contents","class":"OC\\IntegrityCheck\\Helpers\\FileAccessHelper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":520,"function":"verify","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Integrity/CheckApp.php","line":72,"function":"verifyAppSignature","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Integrity\\CheckApp","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Base.php","line":168,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"OC\\Core\\Command\\Base","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Console/Application.php","line":209,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/console.php","line":99,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/occ","line":11,"args":["/var/www/html/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"61431edbce04f"}
{"reqId":"3IeoQIb4ElBwa6QAOmDC","level":3,"time":"2021-09-16T11:23:25+02:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/html/nextcloud/apps/files_accesscontrol/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","userAgent":"--","version":"22.1.1.2","exception":{"Exception":"Error","Message":"file_get_contents(/var/www/html/nextcloud/apps/files_accesscontrol/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php","line":44,"function":"file_get_contents"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":329,"function":"file_get_contents","class":"OC\\IntegrityCheck\\Helpers\\FileAccessHelper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":520,"function":"verify","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Integrity/CheckApp.php","line":72,"function":"verifyAppSignature","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Integrity\\CheckApp","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Base.php","line":168,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"OC\\Core\\Command\\Base","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Console/Application.php","line":209,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/console.php","line":99,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/occ","line":11,"args":["/var/www/html/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"61431edbce0a8"}
{"reqId":"iOdBCN0MtC9ucjmJyuKV","level":3,"time":"2021-09-16T11:21:16+02:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/html/nextcloud/apps/external/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","userAgent":"--","version":"22.1.1.2","exception":{"Exception":"Error","Message":"file_get_contents(/var/www/html/nextcloud/apps/external/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php","line":44,"function":"file_get_contents"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":329,"function":"file_get_contents","class":"OC\\IntegrityCheck\\Helpers\\FileAccessHelper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":520,"function":"verify","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Integrity/CheckApp.php","line":72,"function":"verifyAppSignature","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Integrity\\CheckApp","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Base.php","line":168,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"OC\\Core\\Command\\Base","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Console/Application.php","line":209,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/console.php","line":99,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/occ","line":11,"args":["/var/www/html/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"61431edbce0f6"}
{"reqId":"nImcig3jG2G5yUYFKwkI","level":3,"time":"2021-09-16T11:19:28+02:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/html/nextcloud/apps/contacts/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","userAgent":"--","version":"22.1.1.2","exception":{"Exception":"Error","Message":"file_get_contents(/var/www/html/nextcloud/apps/contacts/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php","line":44,"function":"file_get_contents"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":329,"function":"file_get_contents","class":"OC\\IntegrityCheck\\Helpers\\FileAccessHelper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":520,"function":"verify","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Integrity/CheckApp.php","line":72,"function":"verifyAppSignature","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Integrity\\CheckApp","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Base.php","line":168,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"OC\\Core\\Command\\Base","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Console/Application.php","line":209,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/console.php","line":99,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/occ","line":11,"args":["/var/www/html/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"61431edbce146"}
{"reqId":"07Lday104v3WBLlAf0Jy","level":3,"time":"2021-09-16T11:12:41+02:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/html/nextcloud/apps/calendar/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","userAgent":"--","version":"22.1.1.2","exception":{"Exception":"Error","Message":"file_get_contents(/var/www/html/nextcloud/apps/calendar/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php","line":44,"function":"file_get_contents"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":329,"function":"file_get_contents","class":"OC\\IntegrityCheck\\Helpers\\FileAccessHelper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":520,"function":"verify","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Integrity/CheckApp.php","line":72,"function":"verifyAppSignature","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Integrity\\CheckApp","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Base.php","line":168,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"OC\\Core\\Command\\Base","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Console/Application.php","line":209,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/console.php","line":99,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/occ","line":11,"args":["/var/www/html/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"61431edbce194"}
{"reqId":"HZPzRLTfHDTUxPhMB7Ao","level":3,"time":"2021-09-16T11:09:38+02:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/html/nextcloud/apps/apporder/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","userAgent":"--","version":"22.1.1.2","exception":{"Exception":"Error","Message":"file_get_contents(/var/www/html/nextcloud/apps/apporder/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php","line":44,"function":"file_get_contents"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":329,"function":"file_get_contents","class":"OC\\IntegrityCheck\\Helpers\\FileAccessHelper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":520,"function":"verify","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Integrity/CheckApp.php","line":72,"function":"verifyAppSignature","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Integrity\\CheckApp","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Base.php","line":168,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"OC\\Core\\Command\\Base","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Console/Application.php","line":209,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/console.php","line":99,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/occ","line":11,"args":["/var/www/html/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"61431edbce1e3"}
{"reqId":"j4dERddiIpdHd7mVlLBS","level":3,"time":"2021-09-16T11:04:49+02:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/html/nextcloud/apps/contacts/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","userAgent":"--","version":"22.1.1.2","exception":{"Exception":"Error","Message":"file_get_contents(/var/www/html/nextcloud/apps/contacts/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php","line":44,"function":"file_get_contents"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":329,"function":"file_get_contents","class":"OC\\IntegrityCheck\\Helpers\\FileAccessHelper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":520,"function":"verify","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Integrity/CheckApp.php","line":72,"function":"verifyAppSignature","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Integrity\\CheckApp","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Base.php","line":168,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"OC\\Core\\Command\\Base","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Console/Application.php","line":209,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/console.php","line":99,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/occ","line":11,"args":["/var/www/html/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"61431edbce231"}
{"reqId":"HoLBpcrf9bBWTDphEI2t","level":3,"time":"2021-09-16T11:04:32+02:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/html/nextcloud/apps/calendar/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","userAgent":"--","version":"22.1.1.2","exception":{"Exception":"Error","Message":"file_get_contents(/var/www/html/nextcloud/apps/calendar/appinfo/signature.json): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php#44","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php","line":44,"function":"file_get_contents"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":329,"function":"file_get_contents","class":"OC\\IntegrityCheck\\Helpers\\FileAccessHelper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":520,"function":"verify","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Integrity/CheckApp.php","line":72,"function":"verifyAppSignature","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Integrity\\CheckApp","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/Base.php","line":168,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"OC\\Core\\Command\\Base","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Console/Application.php","line":209,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/console.php","line":99,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/occ","line":11,"args":["/var/www/html/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"61431edbce27f"}

@Earl0fPudding
Copy link

The problem still exists on version 23.0.0, although I managed to do a workaround:

  1. Add the line 'integrity.check.disabled' => true, to config/config.php
  2. Do an integrity check (Settings -> Admin -> Overview), it should be gone now
  3. Remove the line from point 1
  4. Do an integrity check again and it should be gone for good now

@pgassmann
Copy link

With 23.0.2 i got the same error.

if there's a occ command to update this list and apps can extend it, this file should be excluded from integrity check.

The header of that file mimetypelist.js

/**
* This file is automatically generated
* DO NOT EDIT MANUALLY!
*
* You can update the list of MimeType Aliases in config/mimetypealiases.json
* The list of files is fetched from core/img/filetypes
* To regenerate this file run ./occ maintenance:mimetype:update-js
*/

The difference in my instance:

diff /root/mimetypelist.js nextcloud/core/js/mimetypelist.js

113c113,117
<     "application/vnd.xmind.workbook": "mindmap"
---
>     "application/vnd.xmind.workbook": "mindmap",
>     "image/targa": "image/tga",
>     "": "x-office/document",
>     "application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf": "x-office/document",
>     "application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform": "x-office/document"

This issue is present since at least NC 15!

@skjnldsv Please reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue Small tasks with clear documentation about how and in which place you need to fix things in. papercut Annoying recurring issue with possibly simple fix.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants