In provsioning_db_connect(), it would be better to report the actual error from mysql, not just that an error occured:


if (!$connection) {
drush_set_error('PROVISION_MASTER_DB_FAILED', dt('Could not connect to the master \
database server.') ." ". mysql_error(), 'error');
}
else {
$success = @mysql_select_db('mysql', $connection);
if ($success) {
_provision_db_connection($connection);
}
else {
drush_set_error('PROVISION_MASTER_DB_FAILED', dt('Could not select the mysql dat\
abase.') .' '. mysql_error(), 'error');
return FALSE;
}
}

Comments

anarcat’s picture

Status: Needs review » Needs work

The issue here is that such a message may expose the database connection details, I'm not sure it's a good idea.

anarcat’s picture

Status: Needs work » Fixed

Okay, after checking, only the username is exposed in MySQL 5.0, so i'll commit this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit c286f62 on debian, dev-dns, dev-envobject, dev-koumbit, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newhooks, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-restore, dev-services, dev-simplerinstaller, dev-site_rename, dev-ssl, dev_716166_apache_conf, dev_dns, dev_server_verify, prod-koumbit, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x by anarcat:
    #654614 - improve database error handling