Security update for Core, with self-updated composer
[yaffs-website] / vendor / drush / drush / commands / sql / sql.drush.inc
index 23ab737db62a8e4e5924b703d845e3f0581089ea..b820ab0d2ad44356c0bc303358b3a8ae918cc4e2 100644 (file)
@@ -444,7 +444,11 @@ function drush_sql_drop() {
 function drush_sql_cli() {
   drush_sql_bootstrap_further();
   $sql = drush_sql_get_class();
-  return !(bool)drush_shell_proc_open($sql->connect());
+  $result = !drush_shell_proc_open($sql->connect());
+  if (!$result) {
+    drush_set_error('DRUSH_SQL_CLI_ERROR', dt('SQL client error occurred.'));
+  }
+  return $result;
 }
 
 /**
@@ -578,7 +582,7 @@ function sql_drush_sql_sync_sanitize($site) {
   $message_list = array();
 
   // Sanitize passwords.
-  $newpassword = drush_get_option(array('sanitize-password', 'destination-sanitize-password'), 'password');
+  $newpassword = drush_get_option(array('sanitize-password', 'destination-sanitize-password'), drush_generate_password());
   if ($newpassword != 'no' && $newpassword !== 0) {
     $pw_op = "";