Securing wp-config leads to sensitive information leak on wp-settings

Hm, core WP files are usually die properly if opened directly. It probably slipped developers to include check in this one or something.

The simple ways to fix this (and not really WP-specific) would be to:

  • configure PHP on server to not display errors by default;
  • restrict access to file with .htaccess or other means.