Skip to content

Commit 27edfab

Browse files
steveoliverweitzman
authored andcommitted
'Sanitize query failed' with 'sqlsan --sanitize-password=no' on D8 (drush-ops#2251)
* Fixed undefined major_version var when password not sanitized for D8.
1 parent fa7bf71 commit 27edfab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commands/sql/sql.drush.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -619,14 +619,14 @@ function drush_sql_get_version() {
619619
function sql_drush_sql_sync_sanitize($site) {
620620
$site_settings = drush_sitealias_get_record($site);
621621
$databases = sitealias_get_databases_from_record($site_settings);
622+
$major_version = drush_drupal_major_version();
622623
$wrap_table_name = (bool) drush_get_option('db-prefix');
623624
$user_table_updates = array();
624625
$message_list = array();
625626

626627
// Sanitize passwords.
627628
$newpassword = drush_get_option(array('sanitize-password', 'destination-sanitize-password'), 'password');
628629
if ($newpassword != 'no' && $newpassword !== 0) {
629-
$major_version = drush_drupal_major_version();
630630
$pw_op = "";
631631

632632
// In Drupal 6, passwords are hashed via the MD5 algorithm.

0 commit comments

Comments
 (0)