]> source.dussan.org Git - nextcloud-server.git/commit
fix(SetupCheck): Properly check public access to data directory 46456/head
authorFerdinand Thiessen <opensource@fthiessen.de>
Thu, 11 Jul 2024 18:53:37 +0000 (20:53 +0200)
committerAndy Scherzinger <info@andy-scherzinger.de>
Thu, 8 Aug 2024 20:08:42 +0000 (22:08 +0200)
commit0563757ea43b853770305f80c763a547525abf66
treec07ae092b92002e7a2f98fcdb55449e6306d092f
parent8c0bece57aee2aca571650e6c2decad27088a5ae
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>
12 files changed:
apps/settings/lib/SetupChecks/DataDirectoryProtected.php
apps/settings/tests/SetupChecks/DataDirectoryProtectedTest.php
lib/composer/composer/autoload_classmap.php
lib/composer/composer/autoload_static.php
lib/private/Repair.php
lib/private/Repair/NC30/RemoveLegacyDatadirFile.php [new file with mode: 0644]
lib/private/Setup.php
lib/private/Updater.php
lib/private/User/Manager.php
lib/private/legacy/OC_Util.php
tests/lib/UtilCheckServerTest.php
tests/lib/UtilTest.php