diff options
Diffstat (limited to 'core/js/setupchecks.js')
-rw-r--r-- | core/js/setupchecks.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js index 4764efc035d..4d2097a5b5d 100644 --- a/core/js/setupchecks.js +++ b/core/js/setupchecks.js @@ -198,7 +198,8 @@ } var afterCall = function(xhr) { var messages = []; - if (xhr.status !== 403 && xhr.status !== 307 && xhr.status !== 301 && xhr.responseText !== '') { + // .ocdata is an empty file in the data directory - if this is readable then the data dir is not protected + if (xhr.status === 200 && 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 @@ -209,7 +210,7 @@ $.ajax({ type: 'GET', - url: OC.linkTo('', oc_dataURL+'/htaccesstest.txt?t=' + (new Date()).getTime()), + url: OC.linkTo('', oc_dataURL+'/.ocdata?t=' + (new Date()).getTime()), complete: afterCall, allowAuthErrors: true }); |