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

[FIX] Save user password and email from My Account #20737

Merged
merged 3 commits into from
Feb 18, 2021

Conversation

sampaiodiego
Copy link
Member

Proposed changes (including videos or screenshots)

Issue(s)

Closes #19604

Steps to test or reproduce

Further comments

@rasos
Copy link
Contributor

rasos commented Feb 17, 2021

Great to see this fix, as it is really security related, if users can not change their passwords. Also other profile settings (email, avatar image etc) could not be changed.

app/2fa/server/code/index.ts Outdated Show resolved Hide resolved
const canChangePasswordForOAuth = rcSettings.get('Accounts_AllowPasswordChangeForOAuthUsers');
if (canChangePasswordForOAuth || user.services?.password) {
// Should be the last check to prevent error when trying to check password for users without password
if (settings.newPassword && rcSettings.get('Accounts_AllowPasswordChange') === true) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove the === true part of this

Copy link
Member Author

Choose a reason for hiding this comment

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

yep, this is an old code that was just re-indented, but I agree 👍

Ishrat-Manzoor
Ishrat-Manzoor previously approved these changes Feb 17, 2021
@sampaiodiego sampaiodiego merged commit 961706b into develop Feb 18, 2021
@sampaiodiego sampaiodiego deleted the fix-set-user-password branch February 18, 2021 01:40
@sampaiodiego sampaiodiego mentioned this pull request Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QA-Regression: User is not able to change the account password.
5 participants