I'm currently using Joomla and we have a small security vulnerability in our URI. Currently, it displays the Exception/Error directly to the user like so:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line
Which is providing useful information to users who may attempt a SQL injection attack.
How would I force all exceptions/errors to redirect to the home page? This error can only happen if someone directly manipulates the URI and not through clicking the page.
If it helps, I believe this problem is caused by a component we're using that's directly querying with the URI instead of using prepared statements, but I can't seem to pinpoint where it is.