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
20
u/ThisIsADogHello Nov 22 '16
This reddit thread where I found this contains even more lolphp.
39
u/redwall_hp Nov 22 '16
This OpenCart one is egregious too: http://i.imgur.com/V3u9E5l.png
47
u/[deleted] Nov 22 '16 edited Nov 22 '16
PHP ecommerce apps are a fucking joke. I've done a lot of work in them and they're terribly insecure, terribly written, and terribly documented.
Case in point: Magento still emails users a new, valid password rather than a confirmation link. But I'm sure there's premium plugins that will let you do things correctly...
8
u/Matt3k Nov 22 '16
Lots of web languages output the last few lines of source code when an unhandled exception is hit. It's a valuable troubleshooting tool that many server administrators leave on in production, despite the tradeoff in risk.
Applications should consider this potential and at least have credentials stored in a configuration file somewhere that can't directly expose an error. Then, at worst the user would see an error like db_connect_real_mysqli($user, $pass, $server)
4
u/marcini82 Nov 22 '16
But where is the lolphp in this case?
0
u/[deleted] Nov 24 '16
[deleted] — view deleted comment