Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-07-13 12:38:29 +0300
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-07-13 12:38:29 +0300
commit1f57e2fbbdc0a0f8c16590c4849af39028b047c1 (patch)
tree5cacf2b31fcbd9d58a1458718f0536d4de978918 /lib
parentd106335d9c4a0d856414f757f5c36e6b15de4e39 (diff)
[stable9] Workaround to check htaccess in case of redirects (#25435)
* Workaround to check htaccess in case of redirects In some setups, the web server will redirect any call to "data/" to the main page. This causes the XHR to return the 200 HTTP status code and the body contains the HTML page of the main page / files app. This fix improves the htaccess failure detection by adding a known string inside the test file "htaccesstest.txt". If we are able to find this string, it means that the web server didn't block access to that file. * Fix setup check unit test (#25439)
Diffstat (limited to 'lib')
-rw-r--r--lib/private/util.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index e4d1ebabc7b..d53a6ca9864 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -1169,7 +1169,8 @@ class OC_Util {
// testdata
$fileName = '/htaccesstest.txt';
- $testContent = 'This is used for testing whether htaccess is properly enabled to disallow access from the outside. This file can be safely removed.';
+ // test content containing the string "HTACCESSFAIL"
+ $testContent = 'HTACCESSFAIL: This is used for testing whether htaccess is properly enabled to disallow access from the outside. This file can be safely removed.';
// creating a test file
$testFile = $config->getSystemValue('datadirectory', OC::$SERVERROOT . '/data') . '/' . $fileName;