Migrated password hashes support

Thanks @pfaffman

I’ve done some testing and can confirm that it doesn’t work with Drupal 7, which apparantly uses SHA-512 according to Drupal 7: Secure password storage by default at last | Jon Cave

I’ll create a PR if I’m able to add a compatible one.

Rich

3 „Gefällt mir“

Hello :wave:

I migrated a whole lot of content from bbPress over to my discourse installation. I can see all posts and users and stuff. But my users can’t login using their “old” password data from my WP site. I installed the plugin, its listed in my plugin section of my admin area. I checked all the available check marks.

Still: nobody can login!
I also have no idea where to apply the given code from the plugin’s readme:

user = User.find_by(username: 'user')
user.custom_fields['import_pass'] = '5f4dcc3b5aa765d61d8327deb882cf99'
user.save

Also I have no idea what exactly is meant by alternative password hashes talked about in the readme.

@michaeld could you provide some more guidance on how to use the plugin?

As far as I recall the bbpress importer supports the plugin, so you did everything right and that is all you would need to do.

1 „Gefällt mir“

Oh my god, after some more testing it turned out that it actually worked. The problem was a changed password when I tested it :man_facepalming: Sorry! Thanks for the great plugin! Made my life a lot easier!

2 „Gefällt mir“

Hi, I’m having problems making this work. I’ve created a custom field import_pass and installed the plugin. Ran the import script once again on my SMF database but with no luck, no one can login afterwards. On the custom field I can see just a “-“ instead of some hash.

Like other users pointed out before, not sure what do with this:

user = User.find_by(username: 'user')
user.custom_fields['import_pass'] = '5f4dcc3b5aa765d61d8327deb882cf99'
user.save

Appreciate any guidance Does this code go in the smf2.rb import script file or what?

That won’t work. But there is no need to install the plugin during import, or to create a custom field manually. It should be handled by the SMF2 script already. So something else is up.

The code is there as an example for script authors. It’s already in the SMF2 script.

3 „Gefällt mir“

Thanks. That’s great. So you mean, if I remove the manually created custom field and just keep the plugin activated, then it should work by itself and pick up the password hashes when it needs too.

Is there a log we can check to see why the plugin isn’t doing what is supposed to?

The plugin takes care of interpreting and using the custom fields that have been set by the importer. If the custom fields are empty or not there, then it is not an issue with the plugin, but an issue with the importer.

2 „Gefällt mir“

Soll das Plugin vor oder nach der Migration installiert werden? Oder ändert das nichts?

TL;DR: danach.

Sie sollten das Plugin auf der Instanz installieren, auf der das migrierte Forum tatsächlich läuft.

Wir haben Fälle beobachtet, in denen das Plugin Probleme verursachte, wenn es auf einer Instanz installiert war, auf der tatsächlich das Migrations-Skript lief. Daher empfehlen wir davon ab, es dort zu installieren.

4 „Gefällt mir“

Hallo,

Hat das schon jemand mit Passwort-Hashes von Auth0 getestet?

Ich kann das nicht einfach selbst testen, da der Export von Passwort-Hashes bei Auth0 nur für zahlende Kunden verfügbar ist. Ich wollte nur wissen, ob das jemand bereits ausprobiert hat, bevor ich diesen Weg einschlage.

Anscheinend werden die Passwörter mit bcrypt und 10 Salt-Runden gehasht.

Vielen Dank.

2 „Gefällt mir“

Hallo, hat sich zufällig etwas bezüglich der Drupal 7-Unterstützung geändert?

Hoppla, 2 Jahre alte Frage, die ich übersehen habe!

bcrypt sollte unabhängig von der Anzahl der Runden unterstützt werden, solange die Runden auf die übliche Weise kodiert sind ($2a$10$...)

Nein, dieser Code wurde seit über 3 Jahren nicht mehr angefasst.

1 „Gefällt mir“