Rails 7.1: Dockerfiles, BYO Authentication, More Async Queries, and More
rubyonrails.org
rubyonrails.org
generates_token_for :password_reset, expires_in: 15.minutes do
# Last 10 characters of password salt, which changes when password is updated:
password_salt&.last(10)
end
Using a value that can be known externally -- because it is saved in plain text in the database, which I assume has been, will be, and is being breached -- seems like a security hole.If someone knows that my application will just use the last 10 characters of the salt for a password reset token and they initiate the password reset for a user, they can potentially use the data from last month's breach to reset a user's password.
> You can now generate new applications using Bun as your JavaScript runtime. To do so, you can pass the --javascript=bun option to rails new.