To protect the wp-config.php file using htaccess is a well known security precaution for any WP pro. The issue however is if you have a copy of said file, in which case protecting the main version would be useless. Also I'd say the blame if you can assign any is on Vim, Emacs, Gedit, and Nano which would have had to crash in order to set these chain of events in motion.
1% of CMS-Powered Sites Expose Their Database Passwords (2011)
11–20 of 94 posts
Re: 1% of CMS-Powered Sites Expose Their Database Passwords (2011)
#12Re: 1% of CMS-Powered Sites Expose Their Database Passwords (2011)
#13[deleted]
I think you should delete your comment. It's not helpful to hand out other peoples' passwords like that, regardless of how easy it might be to find them.
Re: 1% of CMS-Powered Sites Expose Their Database Passwords (2011)
#14To protect the wp-config.php file using htaccess is a well known security precaution for any WP pro. The issue however is if you have a copy of said file, in which case protecting the main version would be useless. Also I'd say the blame if you can assign any is on Vim, Emacs, Gedit, and Nano which would have had to crash in order to set these chain of events in motion.
... Or the guy who is just editing files directly on the server (or shovelling everything up with FTP), instead of sane version control.
(I'm not sure anyone doing the former can be counted as "Pro", WP or otherwise.)
Re: 1% of CMS-Powered Sites Expose Their Database Passwords (2011)
#15How utterly stupid do you have to be to engineer software that requires you to have configuration files in a publicly accessible folder? Even most shared hosts now will have a public_html folder and the ability to put sensitive stuff not inside it. The .htaccess hacks are great but they are just patching the symptom, and one slip up and you're back to square one. The best way to do configuration is to have it in envi…
Re: 1% of CMS-Powered Sites Expose Their Database Passwords (2011)
#16To protect the wp-config.php file using htaccess is a well known security precaution for any WP pro. The issue however is if you have a copy of said file, in which case protecting the main version would be useless. Also I'd say the blame if you can assign any is on Vim, Emacs, Gedit, and Nano which would have had to crash in order to set these chain of events in motion.
Re: 1% of CMS-Powered Sites Expose Their Database Passwords (2011)
#17This is why everything except a font accessor (index.php) should be stored in a directory behind the publicly accessible web root directory. It's standard practice for most web frameworks, and yet it seems the most popular CMSs don't bother.
It would make the CMSs harder to deploy, security gets traded off for convenience.
Re: 1% of CMS-Powered Sites Expose Their Database Passwords (2011)
#18You can store the login credentials there : http://www.php.net/manual/en/pdo.construct.php
This is another reason why you should move away from mysql(i) to PDO.
Or if that doesn't work, try storing in the .htaccess or Apache conf environment variables : http://stackoverflow.com/a/2583857
Re: 1% of CMS-Powered Sites Expose Their Database Passwords (2011)
#19To protect the wp-config.php file using htaccess is a well known security precaution for any WP pro. The issue however is if you have a copy of said file, in which case protecting the main version would be useless. Also I'd say the blame if you can assign any is on Vim, Emacs, Gedit, and Nano which would have had to crash in order to set these chain of events in motion.
Re: 1% of CMS-Powered Sites Expose Their Database Passwords (2011)
#20Which if allowed is even more stupid.
If you run mysql only locally then do skip-networking and if you have to have networking restrict the ips it's allowed from.
If they can use the mysql password locally, well then you have far bigger problems with security than mysql and exposed php configuration files.