I have always had concern with config.php having db user and pw exposed in it…..but today my worse fears were realized when I was ftp into the site and changing some stuff…......what it was had nothing to do with config.php or any core EE files…or even any files related to the forums.
But, what happened was this - for a few seconds users were presented with a screen of garbled text including the full contents of config.php! I know for a fact that a number of members saved it…..because they sent it to me!
Now, I cannot duplicate the error, but my question is this - are there ways I can make it so a dump of config.php does not contain a plain english password to the main dbs?
I tried once to do the simple “include” or require, but for some reason it caused an error…and that would probably return the pw anyway.
Oh, the dump was virtually everything! All the censored words, etc. etc. etc…...I posted some of it below….
Again, my concern is not what I did to make it occur (it was just editing and looking at a doc via ftp), but rather how I can keep the db name and pw safe…the other info is not as important….
————-
dump (edited)
————-
Preferences Object ( [core_ini] => Array ( [enable_image_resizing] => y [image_resize_protocol] => gd2 [image_library_path] => /usr/local/bin/ [thumbnail_prefix] => thumb [word_separator] => underscore [use_category_name] => n [reserved_category_word] => category [auto_convert_high_ascii] => n [new_posts_clear_caches] => n [auto_assign_cat_parents] => y [site_404] => wiki/index [save_tmpl_revisions] => y [max_tmpl_revisions] => 15 [save_tmpl_files] => n [tmpl_file_basepath] => [strict_urls] => n [un_min_len] => 4 [pw_min_len] => 5 [allow_member_registration] => y [allow_member_localization] => y [req_mbr_activation] => none [new_member_notification] => n [mbr_notification_emails] => [require_terms_of_service] => y [use_membership_captcha] => y [default_member_group] => 5 [profile_trigger] => cost [member_theme] => default [enable_avatars] => y [allow_avatar_uploads] => y [avatar_url] => http://www.hearth.com/econtent/images/avatars/ [avatar_path] => [cookie_prefix] => [user_session_type] => c [admin_session_type] => c [allow_username_change] => y [allow_multi_logins] => y [password_lockout] => y [password_lockout_interval] => 1 [require_ip_for_login] => n [require_ip_for_posting] => n [allow_multi_emails] => n [require_secure_passwords] => n [allow_dictionary_pw] => n [name_of_dictionary_file] => [xss_clean_uploads] =>
———-and the really important part————-
app_version] => 170 [license_number] => 7837-########3 [debug] => 1 [install_lock] => 1 [db_hostname] => ##### [db_username] => ###### [db_password] => ##### [db_name] => eengine [db_type] => mysql [db_prefix] => exp [db_conntype] => 0 [system_folder] =>
Any suggestions on securing either the entire file, or most importantly the db stuff…..welcome.