aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-02-04 16:13:27 +0100
committerLukas Reschke <lukas@owncloud.com>2016-02-04 16:13:27 +0100
commit5ba6148bfee9399de60317e724e2775eac6238a3 (patch)
tree3d371345365c9f971bbccb5e127ccc60ee4c36d6
parent52ce83993d16edf7ddacede5968ef5c32459479c (diff)
downloadnextcloud-server-5ba6148bfee9399de60317e724e2775eac6238a3.tar.gz
nextcloud-server-5ba6148bfee9399de60317e724e2775eac6238a3.zip
Add check for content
The response may be a redirect which is always followed by jQuery. Thus leading to false positives depending on the server configuration (e.g. when it issues a 302) To prevent that there is also a check performed on the response content.
-rw-r--r--core/js/setupchecks.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index bc49c61a5aa..de41b66ec32 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -194,7 +194,7 @@
}
var afterCall = function(xhr) {
var messages = [];
- if (xhr.status !== 403 && xhr.status !== 307 && xhr.status !== 301) {
+ if (xhr.status !== 403 && xhr.status !== 307 && xhr.status !== 301 && xhr.responseText === '') {
messages.push({
msg: t('core', 'Your data directory and your files are probably accessible from the Internet. The .htaccess file is not working. We strongly suggest that you configure your web server in a way that the data directory is no longer accessible or you move the data directory outside the web server document root.'),
type: OC.SetupChecks.MESSAGE_TYPE_ERROR