diff options
author | Joas Schilling <coding@schilljs.com> | 2019-02-28 11:05:28 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2019-03-04 12:14:22 +0100 |
commit | c6a69ba92514587814d0f03b51e1d1f026a49350 (patch) | |
tree | b7162fff445ea0595280b535b95a60b689f742dd /tests | |
parent | 814bf0de20b05ef44d4558d49cc3dc655da1c58d (diff) | |
download | nextcloud-server-c6a69ba92514587814d0f03b51e1d1f026a49350.tar.gz nextcloud-server-c6a69ba92514587814d0f03b51e1d1f026a49350.zip |
Remove the upload and memory setting
* Remove unneeded private method phpFileSize()
* Bump autoloader
* Remove setUploadLimit tests
* Remove integrity check hacks for upload limit
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/integritycheck/htaccessWithValidModifiedContent/.htaccess | 3 | ||||
-rw-r--r-- | tests/data/integritycheck/htaccessWithValidModifiedContent/.user.ini | 7 | ||||
-rw-r--r-- | tests/lib/FilesTest.php | 137 | ||||
-rw-r--r-- | tests/lib/IntegrityCheck/CheckerTest.php | 14 | ||||
-rw-r--r-- | tests/lib/LegacyHelperTest.php | 22 |
5 files changed, 6 insertions, 177 deletions
diff --git a/tests/data/integritycheck/htaccessWithValidModifiedContent/.htaccess b/tests/data/integritycheck/htaccessWithValidModifiedContent/.htaccess index e42d92da679..1b5eb98b7f8 100644 --- a/tests/data/integritycheck/htaccessWithValidModifiedContent/.htaccess +++ b/tests/data/integritycheck/htaccessWithValidModifiedContent/.htaccess @@ -1,8 +1,5 @@ # Start of valid file <IfModule mod_php7.c> - php_value upload_max_filesize 519M - php_value post_max_size 519M - php_value memory_limit 512M php_value mbstring.func_overload 0 php_value always_populate_raw_post_data -1 php_value default_charset 'UTF-8' diff --git a/tests/data/integritycheck/htaccessWithValidModifiedContent/.user.ini b/tests/data/integritycheck/htaccessWithValidModifiedContent/.user.ini deleted file mode 100644 index 90959b1e649..00000000000 --- a/tests/data/integritycheck/htaccessWithValidModifiedContent/.user.ini +++ /dev/null @@ -1,7 +0,0 @@ -upload_max_filesize=519M -post_max_size=519M -memory_limit=512M -mbstring.func_overload=0 -always_populate_raw_post_data=-1 -default_charset='UTF-8' -output_buffering=0 diff --git a/tests/lib/FilesTest.php b/tests/lib/FilesTest.php deleted file mode 100644 index 1d26984ee72..00000000000 --- a/tests/lib/FilesTest.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php -/** - * @author Robin McCorkell <rmccorkell@karoshi.org.uk> - * - * @copyright Copyright (c) 2015, ownCloud, Inc. - * @license AGPL-3.0 - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - */ - -namespace Test; - -class FilesTest extends \Test\TestCase { - - const UPLOAD_LIMIT_DEFAULT_STR = '511M'; - const UPLOAD_LIMIT_SETTING_STR = '2M'; - const UPLOAD_LIMIT_SETTING_BYTES = 2097152; - - /** @var array $tmpDirs */ - private $tmpDirs = []; - - /** - * @return array - */ - private function getUploadLimitTestFiles() { - $dir = \OC::$server->getTempManager()->getTemporaryFolder(); - $this->tmpDirs[] = $dir; - $result = [ - '.htaccess' => $dir . '/htaccess', - '.user.ini' => $dir . '/user.ini' - ]; - copy(\OC::$SERVERROOT . '/tests/data/setUploadLimit/htaccess', $result['.htaccess']); - copy(\OC::$SERVERROOT . '/tests/data/setUploadLimit/user.ini', $result['.user.ini']); - return $result; - } - - protected function tearDown() { - foreach ($this->tmpDirs as $dir) { - \OC_Helper::rmdirr($dir); - } - parent::tearDown(); - } - - public function testSetUploadLimitSizeSanity() { - $this->assertFalse(\OC_Files::setUploadLimit(PHP_INT_MAX + 10)); - $this->assertFalse(\OC_Files::setUploadLimit(\OC_Files::UPLOAD_MIN_LIMIT_BYTES - 10)); - $this->assertFalse(\OC_Files::setUploadLimit('foobar')); - } - - public function setUploadLimitWriteProvider() { - return [ - [ - // both files writable - true, true, - self::UPLOAD_LIMIT_SETTING_BYTES, self::UPLOAD_LIMIT_SETTING_BYTES, - self::UPLOAD_LIMIT_SETTING_STR, self::UPLOAD_LIMIT_SETTING_STR - ], - [ - // neither file writable - false, false, - self::UPLOAD_LIMIT_SETTING_BYTES, false, - self::UPLOAD_LIMIT_DEFAULT_STR, self::UPLOAD_LIMIT_DEFAULT_STR - ], - [ - // only .htaccess writable - true, false, - self::UPLOAD_LIMIT_SETTING_BYTES, false, - self::UPLOAD_LIMIT_SETTING_STR, self::UPLOAD_LIMIT_DEFAULT_STR - ], - [ - // only .user.ini writable - false, true, - self::UPLOAD_LIMIT_SETTING_BYTES, false, - self::UPLOAD_LIMIT_DEFAULT_STR, self::UPLOAD_LIMIT_SETTING_STR - ], - [ - // test rounding of values - true, true, - self::UPLOAD_LIMIT_SETTING_BYTES + 20, self::UPLOAD_LIMIT_SETTING_BYTES, - self::UPLOAD_LIMIT_SETTING_STR, self::UPLOAD_LIMIT_SETTING_STR - ] - ]; - } - - /** - * @dataProvider setUploadLimitWriteProvider - */ - public function testSetUploadLimitWrite( - $htaccessWritable, $userIniWritable, - $setSize, $expectedSize, - $htaccessStr, $userIniStr - ) { - $this->markTestSkipped('TODO: Disable because fails on drone'); - - $files = $this->getUploadLimitTestFiles(); - chmod($files['.htaccess'], ($htaccessWritable ? 0644 : 0444)); - chmod($files['.user.ini'], ($userIniWritable ? 0644 : 0444)); - - $htaccessSize = filesize($files['.htaccess']); - $userIniSize = filesize($files['.user.ini']); - $htaccessSizeMod = 2*(strlen($htaccessStr) - strlen(self::UPLOAD_LIMIT_DEFAULT_STR)); - $userIniSizeMod = 2*(strlen($userIniStr) - strlen(self::UPLOAD_LIMIT_DEFAULT_STR)); - - $this->assertEquals($expectedSize, \OC_Files::setUploadLimit($setSize, $files)); - - // check file contents - $htaccess = file_get_contents($files['.htaccess']); - $this->assertEquals(1, - preg_match('/php_value upload_max_filesize '.$htaccessStr.'/', $htaccess) - ); - $this->assertEquals(1, - preg_match('/php_value post_max_size '.$htaccessStr.'/', $htaccess) - ); - $this->assertEquals($htaccessSize + $htaccessSizeMod, filesize($files['.htaccess'])); - - $userIni = file_get_contents($files['.user.ini']); - $this->assertEquals(1, - preg_match('/upload_max_filesize='.$userIniStr.'/', $userIni) - ); - $this->assertEquals(1, - preg_match('/post_max_size='.$userIniStr.'/', $userIni) - ); - $this->assertEquals($userIniSize + $userIniSizeMod, filesize($files['.user.ini'])); - } -} diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index d0a40a7ad93..91d1fa36758 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -624,14 +624,13 @@ class CheckerTest extends TestCase { $this->checker->writeCoreSignature($x509, $rsa, \OC::$SERVERROOT . '/tests/data/integritycheck/htaccessWithInvalidModifiedContent/'); } - public function testWriteCoreSignatureWithValidModifiedHtaccessAndUserIni() { + public function testWriteCoreSignatureWithValidModifiedHtaccess() { $expectedSignatureFileData = '{ "hashes": { - ".htaccess": "04d8d8eaa5893d2c30df955ff25d8f75e4ee7eb7d24f7f28b47e7b1d0cce2c339db47debf8de8c80b3d25b5da4da50128720564a30ad1af8d7106d48e6f07ae8", - ".user.ini": "467d4f028c447895716a2b7859ed6e569f8ee34b87b51d73dab2e6a9ca4fbe63172c7be3e365ae864a60408286afcce852dd38ee544b61685ed4ee5e021fecb0", + ".htaccess": "7e6a7a4d8ee4f3fbc45dd579407c643471575a9d127d1c75f6d0a49e80766c3c587104b2139ef76d2a4bffce3f45777900605aaa49519c9532909b71e5030227", "subfolder\/.htaccess": "2c57b1e25050e11dc3ae975832f378c452159f7b69f818e47eeeafadd6ba568517461dcb4d843b90b906cd7c89d161bc1b89dff8e3ae0eb6f5088508c47befd1" }, - "signature": "HpDOx2nLrquRkez2BINtfAOyStlzxWKrE8NJtNdj9ZkSA4iV9GVhgnw6e38jH5Ql+mf+d+r5xM0WRgByTul3Z+9gvtv7huAYLSumwxF4g8u42Q3zC+iB6H8nurea7TQy6WOkDl9XSxXv79DqpDsd3kvLTQi4JpYt\/bI8UXo9jcfB13Yp6s4tQLbCLwLcPxGCAifviB+cHsCGvu01ewyVIFSbLeOaIgAxujXZyodDPJCKPLd5ctKfy4t9YHrCG3HYTh\/HdT3N1gJ62tCJDj+EjwpnIdxSl3aAR8wXyxCvhoGxUNe8pvT8Q9TiI5t+eSjZ8wh+4AavA9lFLipukRO\/ZElSj55nsuRPS8PhszN6Ph57mNX1pIKhgaCp6ERhmD3PGsPQAK9Ymj4j6RCJZ06Cj6+ck4Vs+FJSmvVfz2FLleGBM6tfXgHDvbSPebq9zFukCSID7K1p0p07qu4Z1uuZI9JycghrWoVchQYjx1GndizTSaa55JtVY\/c1yLSHXBXlxt7M8Dc26vvGW+Dpn2aVtoG2N0eigyY7KMukgsBy9jUqEI7094kxtdIaCew7lLf0lRqpKEc+RweR+ielfpP+2r3hmVLYHQ+6Cbroht8clfbkEYpRBOGwf9Bg+uqdDqS6EIhKtFE0wp7QzRSiqGT3\/wiS\/UqM5MV1BM3R5JWRH54=", + "signature": "YVwQvl9Dh8UebCumfgzFxfz3NiZJLmYG8oJVTfEBhulI4KXBnTG1jZTprf4XxG2XIriEYAZXsoXpu9xWsUFe9QfdncwoEpqJtGq7l6aVDTofX5Be5b03MQFJr4cflgllqW77QZ84D9O9qWF\/vNDAofXcwrzT04CxLDhyQgTCgYUnRjG9pnuP\/gtbDKbTjRvxhTyfg3T0Phv1+XAvpTPnH2q5A+1+LmiqziUJ1sMipsKo+jQP614eCi9qjmqhHIgLRgcuOBvsi4g5WUcdcAI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lYozH\/eqmxPbTK8n89\/p7Ydun4rI+B2iiLnY8REWWy6+UQ\r\nV204fGUkJqW5CrKy3P3XvY9X\r\n-----END CERTIFICATE-----" }'; $this->environmentHelper @@ -721,7 +720,7 @@ class CheckerTest extends TestCase { $this->assertSame([], $this->checker->verifyCoreSignature()); } - public function testVerifyCoreSignatureWithValidModifiedHtaccessAndUserIniSignatureData() { + public function testVerifyCoreSignatureWithValidModifiedHtaccessSignatureData() { $this->environmentHelper ->expects($this->once()) ->method('getChannel') @@ -738,11 +737,10 @@ class CheckerTest extends TestCase { ->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/htaccessWithValidModifiedContent')); $signatureDataFile = '{ "hashes": { - ".htaccess": "04d8d8eaa5893d2c30df955ff25d8f75e4ee7eb7d24f7f28b47e7b1d0cce2c339db47debf8de8c80b3d25b5da4da50128720564a30ad1af8d7106d48e6f07ae8", - ".user.ini": "467d4f028c447895716a2b7859ed6e569f8ee34b87b51d73dab2e6a9ca4fbe63172c7be3e365ae864a60408286afcce852dd38ee544b61685ed4ee5e021fecb0", + ".htaccess": "7e6a7a4d8ee4f3fbc45dd579407c643471575a9d127d1c75f6d0a49e80766c3c587104b2139ef76d2a4bffce3f45777900605aaa49519c9532909b71e5030227", "subfolder\/.htaccess": "2c57b1e25050e11dc3ae975832f378c452159f7b69f818e47eeeafadd6ba568517461dcb4d843b90b906cd7c89d161bc1b89dff8e3ae0eb6f5088508c47befd1" }, - "signature": "HpDOx2nLrquRkez2BINtfAOyStlzxWKrE8NJtNdj9ZkSA4iV9GVhgnw6e38jH5Ql+mf+d+r5xM0WRgByTul3Z+9gvtv7huAYLSumwxF4g8u42Q3zC+iB6H8nurea7TQy6WOkDl9XSxXv79DqpDsd3kvLTQi4JpYt\/bI8UXo9jcfB13Yp6s4tQLbCLwLcPxGCAifviB+cHsCGvu01ewyVIFSbLeOaIgAxujXZyodDPJCKPLd5ctKfy4t9YHrCG3HYTh\/HdT3N1gJ62tCJDj+Ejwp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vcNAQEFBQADggIBAGoKTnh8RfJV4sQItVC2\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 diff --git a/tests/lib/LegacyHelperTest.php b/tests/lib/LegacyHelperTest.php index 76f38706b4c..96cd190fd62 100644 --- a/tests/lib/LegacyHelperTest.php +++ b/tests/lib/LegacyHelperTest.php @@ -47,28 +47,6 @@ class LegacyHelperTest extends \Test\TestCase { } /** - * @dataProvider phpFileSizeProvider - */ - public function testPhpFileSize($expected, $input) - { - $result = OC_Helper::phpFileSize($input); - $this->assertEquals($expected, $result); - } - - public function phpFileSizeProvider() - { - return array( - array('0B', 0), - array('1K', 1024), - array('9.5M', 10000000), - array('1.3G', 1395864371), - array('465.7G', 500000000000), - array('465661.3G', 500000000000000), - array('465661287.3G', 500000000000000000), - ); - } - - /** * @dataProvider providesComputerFileSize */ function testComputerFileSize($expected, $input) { |