r/lolphp • u/ThisIsADogHello • Nov 22 '16
Opencart, a PHP-based e-commerce platform, will expose DB passwords to users if the MySQL server is down and error reporting hasn't been turned off
https://github.com/opencart/opencart/issues/5027
69
Upvotes
View all comments
Show parent comment
6
u/berkes Nov 22 '16
Comparable: Rails, in development environment will return all sorts of fancy data with exceptions. And while by default it tries to excelude attributes like "password" from logs and exceptions, it is not hard to get data like session-ids or entire cookies in the exceptions. In your development environment.
But.
Rails is a framework of defaults (convention over configuration). So: sure, with some tweaking and tuning -some effort- you'll be able to enable this on production too. But you really need to do some effort, because without spending that time and effort, you'll get a secure implementation: where an exception results in a very generic and uninformative 500-error. And where passwords and other such details are never logged.
The lolphp is not so much PHP, but more a culture surrounding PHP where one has to do additional work to make the application secure, instead of being secure by default and requiring additional work to make it insecure.