-
Notifications
You must be signed in to change notification settings - Fork 114
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
Sanitization example- correct for D7? #79
Comments
Hi @ptmkenny, what is the behavior you are expecting? This code is meant to remove the stored password hashes from the database and replace them with nearly unusable hashes. the purpose of this script is to prevent distribution of real users' password hashes. It is conceivable that you could reverse engineer a usable password to enter for a user after this script ran, but that is not the intention. If you want to log in to a site after running this script you should run |
@stevector Hmm, ok. I was expecting it to have similar behavior to drush sql-sanitize, which by default sets all user passwords to "password". |
@ptmkenny you could use This example was written before Quicksilver had the capacity to run Drush commands. Perhaps we should update this example to use Drush. |
@stevector Have you successfully used drush sql-sanitize on Pantheon? It blows up for me when I try it: $ drush @MYSITE.dev sql-sanitize --sanitize-email=no Fatal error: Class 'Drupal' not found in /opt/pantheon/drush-8/commands/sql/sql.drush.inc on line 658 |
I am getting the same error. @greg-1-anderson, do you have thoughts on this question? |
I may be doing it wrong, but the sanitization example does not seem to be correct for resetting the password on Drupal 7.
When I use the statement:
db_query("UPDATE users SET pass = MD5(CONCAT('MILDSECRET', name));");
And then try to log in, it won't accept the password. The sanitation script references this blog post, http://crackingdrupal.com/blog/greggles/creating-sanitized-drupal-database-dump#comment-164, which is dated to 2010, a year before Drupal 7 was released.
Can the example be updated to handle Drupal 7 as well?
EDIT:
The real goal here is to have a way to do basic DB sanitization (email addresses and passwords) in D7. It doesn't matter if it uses Drush or some other way, but I want to be able to log in as [email protected] with password "password". (in other words, more or less the default behavior of drush sql-sanitize)
The text was updated successfully, but these errors were encountered: