Closed arg closed 2 months ago
Hey @arg! Nothing much can be done about it, unfortunately. Yeah, technically we could check somehow if has_secure_password
or bcrypt
is used and apply limits, but with custom validation, we can't do it automatically as before. I think setting it manually is an acceptable workaround, and it's simple enough.
I'm not entirely sure who I should report this issue to, but it looks like
has_secure_password
change made in https://github.com/rails/rails/pull/47708 partially broke rendering of password inputs, as it doesn't use the regularvalidates_length_of
anymore, but instead goes with a custom validation. So the following snippet renders different output in Rails 7.0 and Rails 7.1Environment
Current behavior
Expected behavior
Notice the
maxlength="72"
andsize="72"
attributes of password inputOf course, as a workaround we can just specify
maxlength
for every password, password confirmation and password challenge input.