The index.php in the template directory only protects you if someone enters the root of a particular directory. However if they know the exact file name they are looking for, it is very possible that the contents of the file will be output into the browser. Particularly for Smarty .tpl files.
I only thought about this because I saw that someone had found my website using the phrase "Powered by WHMCS" coupled with the fact that it seems that many are using the Smarty {php} tag (not recommended by Smarty authors btw) which could include sensitive information.
Anyway the fix is simple, here is the quick way if you are using an apache server with .htaccess enabled.
Put this into your .htaccess file in the web root of your site.
Code:<Files ~ "\.tpl$"> Order allow,deny Deny from all </Files>

Reply With Quote
