heartcombo / devise

Flexible authentication solution for Rails with Warden.
http://blog.plataformatec.com.br/tag/devise/
MIT License
23.83k stars 5.53k forks source link

user.update_with_password ignores password_confirmation #5674

Open anujaware opened 4 months ago

anujaware commented 4 months ago

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 commented 2 weeks ago

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