Skip to content
Snippets Groups Projects
Unverified Commit 19f770d0 authored by Lukas Reschke's avatar Lukas Reschke
Browse files
parent 38b2239b
No related branches found
No related tags found
No related merge requests found
...@@ -354,6 +354,19 @@ class Checker { ...@@ -354,6 +354,19 @@ class Checker {
throw new InvalidSignatureException('Signature could not get verified.'); throw new InvalidSignatureException('Signature could not get verified.');
} }
// 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]);
}
}
}
// Compare the list of files which are not identical // Compare the list of files which are not identical
$currentInstanceHashes = $this->generateHashes($this->getFolderIterator($basePath), $basePath); $currentInstanceHashes = $this->generateHashes($this->getFolderIterator($basePath), $basePath);
$differencesA = array_diff($expectedHashes, $currentInstanceHashes); $differencesA = array_diff($expectedHashes, $currentInstanceHashes);
......
...@@ -29,7 +29,7 @@ class ExcludeFoldersByPathFilterIterator extends \RecursiveFilterIterator { ...@@ -29,7 +29,7 @@ class ExcludeFoldersByPathFilterIterator extends \RecursiveFilterIterator {
parent::__construct($iterator); parent::__construct($iterator);
$appFolders = \OC::$APPSROOTS; $appFolders = \OC::$APPSROOTS;
foreach($appFolders as $key => $appFolder) { foreach($appFolders as $key => $appFolder) {c
$appFolders[$key] = rtrim($appFolder['path'], '/'); $appFolders[$key] = rtrim($appFolder['path'], '/');
} }
...@@ -40,6 +40,11 @@ class ExcludeFoldersByPathFilterIterator extends \RecursiveFilterIterator { ...@@ -40,6 +40,11 @@ class ExcludeFoldersByPathFilterIterator extends \RecursiveFilterIterator {
rtrim($root . '/apps', '/'), rtrim($root . '/apps', '/'),
rtrim($root . '/assets', '/'), rtrim($root . '/assets', '/'),
rtrim($root . '/lost+found', '/'), rtrim($root . '/lost+found', '/'),
// Ignore folders generated by updater since the updater is replaced
// after the integrity check is run.
// See https://github.com/owncloud/updater/issues/318#issuecomment-212497846
rtrim($root . '/updater', '/'),
rtrim($root . '/_oc_upgrade', '/'),
]; ];
$customDataDir = \OC::$server->getConfig()->getSystemValue('datadirectory', ''); $customDataDir = \OC::$server->getConfig()->getSystemValue('datadirectory', '');
if($customDataDir !== '') { if($customDataDir !== '') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment