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

[User Accounts] Fix password bugs: "confirm password" must match; password cannot be email #5426

Merged
merged 2 commits into from
Nov 5, 2019
Merged

[User Accounts] Fix password bugs: "confirm password" must match; password cannot be email #5426

merged 2 commits into from
Nov 5, 2019

Conversation

johnsaigle
Copy link
Contributor

@johnsaigle johnsaigle commented Oct 30, 2019

Brief summary of changes

Password and Confirm Password on the front-end don't need to match on major. This check was removed by mistake during Password refactoring.

Testing instructions (if applicable)

  1. For both Edit User and My Preferences, try creating a new password and enter something different in the Confirm field. You should get an error message.

Links to related tickets (GitHub, Redmine, ...)

@johnsaigle johnsaigle added Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) 22.0.0 TESTING labels Oct 30, 2019
@@ -1081,19 +1088,25 @@ class Edit_User extends \NDB_Form
= 'Please specify password or click Generate new password';
}
}
// Ensure that the password and confirm password fields match.
// TODO This validation should be done on the front-end instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// TODO This validation should be done on the front-end instead.
// TODO This validation should also be done on the front-end.

Never rely to front-end check!

Copy link
Contributor Author

@johnsaigle johnsaigle Nov 4, 2019

Choose a reason for hiding this comment

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

I don't think it's really an issue in this case. It's just a double-check so that someone doesn't make a typo while entering their password. Makes more sense to do that on the front-end and prevent the request from going through if they made a mistake.

$plaintext = $values['Password_hash'];

// Ensure that the password and confirm password fields match.
// TODO This validation should be done on the front-end instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// TODO This validation should be done on the front-end instead.
// TODO This validation should also be done on the front-end.

@driusan
Copy link
Collaborator

driusan commented Nov 4, 2019

This should go to the release branch.. we want it fixed for 22.0, not 23.0, don't we?

@johnsaigle johnsaigle changed the base branch from major to master November 4, 2019 16:27
@johnsaigle
Copy link
Contributor Author

johnsaigle commented Nov 4, 2019

I've rebased it to master 22.0-release.

@johnsaigle johnsaigle changed the base branch from master to 22.0-release November 4, 2019 17:15
@driusan driusan added the Critical to release PR or issue is key for the release to which it has been assigned label Nov 5, 2019
@johnsaigle johnsaigle changed the title [User Accounts] Password and confirmation password must match [User Accounts] Fix password bugs: "confirm password" must match; password cannot be email Nov 5, 2019
@driusan driusan merged commit 1da1660 into aces:22.0-release Nov 5, 2019
@driusan
Copy link
Collaborator

driusan commented Nov 5, 2019

Also fixes #5439

@johnsaigle
Copy link
Contributor Author

I tested this locally and it worked but it wasn't manually tested. Hopefully any potential errors will come up during the next testing round

@ridz1208 ridz1208 added this to the 22.0.0 milestone Nov 11, 2019
driusan pushed a commit that referenced this pull request Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) Critical to release PR or issue is key for the release to which it has been assigned
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants