I've found out the hard way that my website can be hacked by passing a query string parameter that has many ../s to access files outside of the website directory, and then hack the website.
Is there a way, perhaps through the php.ini, to not allow file includes outside of a certain root directory?
To make things worse, most of what is running on the server is not my code. The website runs on the CMS Joomla! and the exploit was done through a purchased plugin.
I cannot change the scripts, if it has to come to that, I'll just uninstall the affected plugins.