Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Sanitize query failed' with 'sqlsan --sanitize-password=no' on D8 #2251

Merged
merged 2 commits into from
Jul 12, 2016
Merged

'Sanitize query failed' with 'sqlsan --sanitize-password=no' on D8 #2251

merged 2 commits into from
Jul 12, 2016

Conversation

steveoliver
Copy link
Contributor

@steveoliver steveoliver commented Jun 28, 2016

With the $major_version variable defined within the TRUE check for password sanitization, sqlsan --sanitize-password=no on Drupal 8 is unable to determine the proper user table to UPDATE and the command will fail with [error] Sanitize query failed.

This 2-line PR simply moves the $major_version variable to the top of the function so that even when passwords are not sanitized, the correct user table can be determined and the query will succeed.

@steveoliver steveoliver changed the title Sanitize query failed when not sanitizing pass with sqlsan on D8 'Sanitize query failed' with 'sqlsan --sanitize-password=no' on D8 Jun 28, 2016
@@ -619,7 +619,7 @@ function drush_sql_get_version() {
function sql_drush_sql_sync_sanitize($site) {
$site_settings = drush_sitealias_get_record($site);
$databases = sitealias_get_databases_from_record($site_settings);
$major_version = drush_drupal_major_version($site_settings['root']);
$major_version = drush_drupal_major_version();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess site_settings['root'] isn't always helpful.

@weitzman weitzman merged commit 27edfab into drush-ops:master Jul 12, 2016
weitzman pushed a commit that referenced this pull request Jul 12, 2016
…2251)

* Fixed undefined major_version var when password not sanitized for D8.
mikeker pushed a commit to mikeker/drush that referenced this pull request Aug 10, 2017
…rush-ops#2251)

* Fixed undefined major_version var when password not sanitized for D8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants