Jump to content

Security breach by using apache Options +Indexes ?


Recommended Posts

I've upgraded my hosting to apache 2.4.7, and when editing the .conf file, I realized that the default prestashop configuration requires:

 

    <Directory "/your_dir">
        Require all granted
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

 

This means that if you then try to list a directory within PS (I'm using 1.5.4.1) such as:

 

http://www.your_site.com/modules

 

I get the dir listing.

 

I think this is not good from a security perspective.

 

Could I use:         Options -Indexes +FollowSymLinks

 

Or PS really needs Indexes on ?

 

Other alternatives/suggestions ?

 

Link to comment
Share on other sites

There's index.php for this.

Usually using default hosting configuration you will never see catalog listing

I tried in a couple of hostings and same problem in both of them, so I don't think this is part of the default configuration.

 

You mean create an empty index.php in every folder ? I guess if this is the case, then PS should do it in the default installation.

 

I think it may be easier -Indexes, unless PS need +Indexes, anyone can confirm that ?

 

Thanks !

Link to comment
Share on other sites

Prestahop includes an index.php file in each directory already.  However this assumes that you have configured your web server software to use index.php as the default page, which you have not shown if you did or not

Yes, y server is configured for index.php.

 

I did a quick check and it seems that modules and other folders/subfolders, don't have a index.php

 

Should I check one by one and then create an empty index.php ?

 

It will be easier and more secure with -Indexes, but not sure if PS needs +Indexes, somebody can tell ?

Link to comment
Share on other sites

Hi, it would be best for this issue to be presented to PrestaShop developers using forge.

 

Please open a 'bug' report here.

 

then please post back here the link to the forge report so others can follow, comment, and vote up.

Developers confirmed in forge that PS doesn't need +Indexes, so I'm going to use -Indexes, which I think is the right thing to do in most of the sites generally.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...