aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/UtilTest.php
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-07-11 20:53:37 +0200
committerAndy Scherzinger <info@andy-scherzinger.de>2024-08-08 22:08:42 +0200
commit0563757ea43b853770305f80c763a547525abf66 (patch)
treec07ae092b92002e7a2f98fcdb55449e6306d092f /tests/lib/UtilTest.php
parent8c0bece57aee2aca571650e6c2decad27088a5ae (diff)
downloadnextcloud-server-0563757ea43b853770305f80c763a547525abf66.tar.gz
nextcloud-server-0563757ea43b853770305f80c763a547525abf66.zip
fix(SetupCheck): Properly check public access to data directory
When checking for public (web) access to the data directory the status is not enough as you might have a webserver that forwards to e.g. a login page. So instead check that the content of the file matches. For this the `.ncdata` file (renamed from `.ocdata`¹) has minimal text content to allow checking. ¹The file was renamed from the legacy `.ocdata`, there is a repair step to remove the old one. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'tests/lib/UtilTest.php')
-rw-r--r--tests/lib/UtilTest.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php
index a83f27d5cf7..cef3f4c063d 100644
--- a/tests/lib/UtilTest.php
+++ b/tests/lib/UtilTest.php
@@ -162,7 +162,7 @@ class UtilTest extends \Test\TestCase {
public function testCheckDataDirectoryValidity() {
$dataDir = \OC::$server->getTempManager()->getTemporaryFolder();
- touch($dataDir . '/.ocdata');
+ touch($dataDir . '/.ncdata');
$errors = \OC_Util::checkDataDirectoryValidity($dataDir);
$this->assertEmpty($errors);
\OCP\Files::rmdirr($dataDir);