Port 2d37341 to stable10

This commit is contained in:
Lukas Reschke 2016-07-21 01:46:11 +02:00
parent fb006181ad
commit d4f9a69a72
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
2 changed files with 18 additions and 0 deletions

View File

@ -354,6 +354,19 @@ class Checker {
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
$currentInstanceHashes = $this->generateHashes($this->getFolderIterator($basePath), $basePath);
$differencesA = array_diff($expectedHashes, $currentInstanceHashes);

View File

@ -40,6 +40,11 @@ class ExcludeFoldersByPathFilterIterator extends \RecursiveFilterIterator {
rtrim($root . '/apps', '/'),
rtrim($root . '/assets', '/'),
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', '');
if($customDataDir !== '') {