Bug Description
Passwords with special characters (specifically exclamation marks) fail to work when seeded through db/seeds.rb, but work when set manually through Rails console.
Steps to Reproduce
- Set password in seeds.rb to
'1234567ab!'
- Run
rails db:reset
- Try to login with
admin@example.com / 1234567ab!
- Login fails with "Invalid email or password"
Expected Behavior
Users should be able to login with the seeded password regardless of special characters.
Actual Behavior
- Password validation fails when password contains
!
- Same password works when set via Rails console using a script file
- Issue appears to be with how the password is processed during seeding
Workaround
Currently using TestPassword123 without special characters in seeds.rb
Environment
- Rails 8.0.2.1
- Ruby 3.3.9
- Devise 4.9.4
- Vue 3 with @vue/compat (may be unrelated)
Additional Context
This issue was discovered during Vue 3 migration testing but appears to be a pre-existing Rails/Devise issue with seed data processing.
Bug Description
Passwords with special characters (specifically exclamation marks) fail to work when seeded through
db/seeds.rb, but work when set manually through Rails console.Steps to Reproduce
'1234567ab!'rails db:resetadmin@example.com/1234567ab!Expected Behavior
Users should be able to login with the seeded password regardless of special characters.
Actual Behavior
!Workaround
Currently using
TestPassword123without special characters in seeds.rbEnvironment
Additional Context
This issue was discovered during Vue 3 migration testing but appears to be a pre-existing Rails/Devise issue with seed data processing.