You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the User model has attributes (email and/or id) encrypted (using Rails' Active Record Encryption) and then, an empty "Sign up" form is submitted, the server returns a 500 Internal Server Error, due to ActiveRecord::Encryption::Errors::Decryption (ActiveRecord::Encryption::Errors::Decryption) being triggered by the line resource.save in Devise's RegistrationsController.
Expected behavior
Instead, a validation error should be returned (i.e. "Email is required").
The text was updated successfully, but these errors were encountered:
john-999
changed the title
Rails' ActiveRecord::Encryption on the attribute User.email prevents the error message from being returned (when email missing)
Rails' ActiveRecord::Encryption on the User attribute (email and/or id) prevents the error message from being returned (when values empty)
Feb 6, 2023
john-999
changed the title
Rails' ActiveRecord::Encryption on the User attribute (email and/or id) prevents the error message from being returned (when values empty)
Rails' ActiveRecord::Encryption on User attributes (email and/or id) prevents the error message from being returned (when values empty)
Feb 6, 2023
If you want to raise an error from the request, you can edit the permitted params to make email required (yet it's not recommended in rails community to do so)
Environment
Current behavior
When the
User
model has attributes (email
and/orid
) encrypted (using Rails' Active Record Encryption) and then, an empty "Sign up" form is submitted, the server returns a500 Internal Server Error
, due toActiveRecord::Encryption::Errors::Decryption (ActiveRecord::Encryption::Errors::Decryption)
being triggered by the lineresource.save
in Devise'sRegistrationsController
.Expected behavior
Instead, a validation error should be returned (i.e. "Email is required").
Trace
The text was updated successfully, but these errors were encountered: