Book Image

PrestaShop Module Development

By : Fabien Serny
Book Image

PrestaShop Module Development

By: Fabien Serny

Overview of this book

Table of Contents (19 chapters)
PrestaShop Module Development
About the Author
About the Reviewers

Securing your module

In this section, we will work on the mymodcarrier module.

Protecting your module against directory listing

Directory listing is enabled on a lot of web servers, and sometimes you can't disable it (it depends on your hosting provider). In our case, if someone wants to see the content of our module, he just has to write the path of the module in his browser.

In my case, the URL will be http://localhost/prestashop/modules/mymodcarrier/. If I enter this URL, the browser will display the following screen:

To avoid this behavior, just add an index.php file in all the directories. In our case, it will be in: