-
Notifications
You must be signed in to change notification settings - Fork 264
Cannot create an account on Prod using a GMail address after address was removed from Persona #2822
Comments
@shane-tomlinson I'm unable to reproduce this using an old gmail account that's new to persona. How else can I help to track this down? |
unable to reproduce here, too. Here's what I think is happening: TLDR - email addresses we staged long ago, when passwords were collected after verification link, are ending up in limbo. Details: (a) the error "missing password for user" occurs when the staged-user row exists but has a null passwd field https://github.com/mozilla/browserid/blob/dev/lib/wsapi/email_for_token.js#L71 (b) the staged-user insert happens here: https://github.com/mozilla/browserid/blob/dev/lib/db/mysql.js#L262 Note how ON DUPLICATE updates a bunch of values, but NOT the passwd field. If the passwd field was null, e.g. for an address we staged long ago, we're in limbo. Looking for evidence that this is indeed the problem, what happens if we double-stage a user with two different passwords (ignoring the first confirmation email). If my theory is correct, then the second password will be ignored. Indeed, it looks like that's exactly what's happening: after clicking the confirmation link, instead of just being logged in, the dialog prompts me for a password, and the password that works is the one I entered in the first stage, not the second one like one would expect. I suspect we need to update that ON DUPLICATE to also update the password hash. |
Extra info from the mailing list: /wsapi/stage_user IS sending the password in the pass field. |
@shane-tomlinson yep, I think this is all in the DB layer with the ON DUPLICATE. |
@benadida - fantastic, I'm glad that you were able to debug this. I was staring at code and nothing was jumping out at me. |
we might consider mitigating the immediate problem by deleting staged emails that are > 1 month old from the database, and then prepare a hotfix against our next train. in any case, I will prepare the fix and a test of it and we can decide how to proceed from there. |
Agreed with mitigation. Safely delete staged users with no password is even
|
GH-2824 merged to dev. Closing. |
STR)
Expected:
Account is created
This error does NOT occur on stage.
Looking at the network console for https://login.persona.org/wsapi/email_for_token?token=aZOdhGIZjvHvsYAiZVHqURQz7Q5vNOfsDfThHMIBFrBcsI3C
Request Headers
Response Headers
Response
The text was updated successfully, but these errors were encountered: