diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-01-26 14:56:17 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2025-01-28 19:49:03 +0000 |
commit | 26c93519f266fad062973716e4b36eca195c2664 (patch) | |
tree | 00066524a9f8741ddf9e48f41f7a79d03c1b7418 /tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php | |
parent | 5650a59cfc7530450424ee04803d75778955b5d6 (diff) | |
download | nextcloud-server-26c93519f266fad062973716e4b36eca195c2664.tar.gz nextcloud-server-26c93519f266fad062973716e4b36eca195c2664.zip |
fix: Harden files scanner for invalid null accessbackport/50436/stable31
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php')
-rw-r--r-- | tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php b/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php index 4f6254cdb94..11c913cd232 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php @@ -35,9 +35,7 @@ class ObjectStoreScannerTest extends TestCase { $data = "dummy file data\n"; $this->storage->file_put_contents('foo.txt', $data); - $this->assertEquals( - [], - $this->scanner->scanFile('foo.txt'), + $this->assertNull($this->scanner->scanFile('foo.txt'), 'Asserting that no error occurred while scanFile()' ); } @@ -54,8 +52,7 @@ class ObjectStoreScannerTest extends TestCase { public function testFolder(): void { $this->fillTestFolders(); - $this->assertEquals( - [], + $this->assertNull( $this->scanner->scan(''), 'Asserting that no error occurred while scan()' ); |