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.update_with_password ignores password_confirmation #5674

Open
anujaware opened this issue Feb 19, 2024 · 1 comment
Open

user.update_with_password ignores password_confirmation #5674

anujaware opened this issue Feb 19, 2024 · 1 comment

Comments

@anujaware
Copy link

It doesn't seems to be resolved or may reccured (previous issue reference).

I am facing the same issue. While user.update_with_password, if I pass current_password, password and password_confirmation it compares current_password and password but ignores password_confirmation
I have enabled validatable in user model.

3.2.0 :011 > user.update_with_password(password: '12345678', password_confirmation: '1234567', current_password: 'dl12347890')
  TRANSACTION (0.1ms)  BEGIN
  User Update (0.5ms)  UPDATE "users" SET "encrypted_password" = $1, "updated_at" = $2 WHERE "users"."id" = $3  [["encrypted_password", "[FILTERED]"], ["updated_at", "2024-02-19 02:22:45.629054"], ["id", 14]]
  TRANSACTION (6.6ms)  COMMIT
 => true 
@aruprakshit
Copy link

@anujaware Show your user model please and Rails version, Devise verstion too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants