summaryrefslogtreecommitdiffstats
path: root/lib/private/IntegrityCheck/Checker.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/IntegrityCheck/Checker.php')
-rw-r--r--lib/private/IntegrityCheck/Checker.php34
1 files changed, 1 insertions, 33 deletions
diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php
index 44544b6770e..0a8876381f4 100644
--- a/lib/private/IntegrityCheck/Checker.php
+++ b/lib/private/IntegrityCheck/Checker.php
@@ -158,8 +158,6 @@ class Checker {
private function generateHashes(\RecursiveIteratorIterator $iterator,
string $path): array {
$hashes = [];
- $copiedWebserverSettingFiles = false;
- $tmpFolder = '';
$baseDirectoryLength = \strlen($path);
foreach($iterator as $filename => $data) {
@@ -180,36 +178,6 @@ class Checker {
continue;
}
- // The .user.ini and the .htaccess file of ownCloud can contain some
- // custom modifications such as for example the maximum upload size
- // to ensure that this will not lead to false positives this will
- // copy the file to a temporary folder and reset it to the default
- // values.
- if($filename === $this->environmentHelper->getServerRoot() . '/.htaccess'
- || $filename === $this->environmentHelper->getServerRoot() . '/.user.ini') {
-
- if(!$copiedWebserverSettingFiles) {
- $tmpFolder = rtrim($this->tempManager->getTemporaryFolder(), '/');
- copy($this->environmentHelper->getServerRoot() . '/.htaccess', $tmpFolder . '/.htaccess');
- copy($this->environmentHelper->getServerRoot() . '/.user.ini', $tmpFolder . '/.user.ini');
- \OC_Files::setUploadLimit(
- \OCP\Util::computerFileSize('511MB'),
- [
- '.htaccess' => $tmpFolder . '/.htaccess',
- '.user.ini' => $tmpFolder . '/.user.ini',
- ]
- );
- }
- }
-
- // The .user.ini file can contain custom modifications to the file size
- // as well.
- if($filename === $this->environmentHelper->getServerRoot() . '/.user.ini') {
- $fileContent = file_get_contents($tmpFolder . '/.user.ini');
- $hashes[$relativeFileName] = hash('sha512', $fileContent);
- continue;
- }
-
// The .htaccess file in the root folder of ownCloud can contain
// custom content after the installation due to the fact that dynamic
// content is written into it at installation time as well. This
@@ -218,7 +186,7 @@ class Checker {
// "#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####" and have the
// hash generated based on this.
if($filename === $this->environmentHelper->getServerRoot() . '/.htaccess') {
- $fileContent = file_get_contents($tmpFolder . '/.htaccess');
+ $fileContent = file_get_contents($filename);
$explodedArray = explode('#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####', $fileContent);
if(\count($explodedArray) === 2) {
$hashes[$relativeFileName] = hash('sha512', $explodedArray[0]);