Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jul 8, 2017

Description

IndexIgnore can be used in the .htaccess only if https://httpd.apache.org/docs/current/mod/mod_autoindex.html is enabled. If not the following internal server error is thrown:

/var/www/owncloud/data/.htaccess: Invalid command 'IndexIgnore', perhaps misspelled or defined by a module not included in the server configuration

when accessing the protected folders like:

http://example.com/data/owncloud.log

Related Issue

Fixes #28307

Motivation and Context

Don't throw 500 internal server errors around if mod_autoindex is not loaded.

How Has This Been Tested?

  1. Adding the code
  2. Accessing the protected directories
  3. See that now a 403 Forbidden is thrown instead of an internal server error

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@ghost
Copy link
Author

ghost commented Jul 8, 2017

Same for user_ldap in owncloud/user_ldap#112

@PVince81 PVince81 added this to the development milestone Jul 10, 2017
@felixboehm felixboehm requested review from jvillafanez and removed request for jvillafanez July 10, 2017 11:05
@felixboehm
Copy link
Contributor

yes, makes sense.

@ghost
Copy link
Author

ghost commented Aug 5, 2017

Backports to stable10, 9.1 and 9 in #28591, #28592 and #28593

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Internal Server Error caused by data/.htaccess

3 participants