Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

Conversation

@vbudhram
Copy link
Contributor

@vbudhram vbudhram commented May 1, 2017

This PR fixes mozilla/fxa-content-server#4996 (comment) by sending a unique error if a user is attempting to reset an account from a secondary email. This will cause the content server not to show the option of creating that account.

@vladikoff r?

@vbudhram vbudhram self-assigned this May 1, 2017
@vbudhram vbudhram requested a review from vladikoff May 1, 2017 17:10
// If no secondary email exists, we want to throw the original account unknown
// error because the user could potentially create this account.
if (emailErr.errno === error.ERRNO.SECONDARY_EMAIL_UNKNOWN) {
return err
Copy link
Contributor

@vladikoff vladikoff May 1, 2017

Choose a reason for hiding this comment

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

should this be throw? contradicts the doc above we want to throw the original account unknown error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch @vladikoff, added a test case to cover this case. Opted to put it in the recovery emails section because it only gets triggered when secondary emails are enabled.

@vladikoff vladikoff merged commit d1fae0d into master May 1, 2017
@vladikoff vladikoff deleted the account-reset-from-secondary branch May 1, 2017 18:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants