Skip to content

Seeds fail with passwords containing special characters #689

Description

@aaronlippold

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

  1. Set password in seeds.rb to '1234567ab!'
  2. Run rails db:reset
  3. Try to login with admin@example.com / 1234567ab!
  4. 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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions