Merge pull request from GHSA-mvm7-38pf-q9fv

This commit is contained in:
Daniel Waterworth 2024-01-08 15:40:10 -06:00 committed by GitHub
parent f31600fce8
commit edcf489ddf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,9 +15,9 @@ DiscoursePluginRegistry.serialized_current_user_fields << "signature_url"
DiscoursePluginRegistry.serialized_current_user_fields << "signature_raw" DiscoursePluginRegistry.serialized_current_user_fields << "signature_raw"
after_initialize do after_initialize do
User.register_custom_field_type("see_signatures", :boolean) register_user_custom_field_type("see_signatures", :boolean)
User.register_custom_field_type("signature_url", :text) register_user_custom_field_type("signature_url", :string, max_length: 32000)
User.register_custom_field_type("signature_raw", :text) register_user_custom_field_type("signature_raw", :string, max_length: 1000)
# add to class and serializer to allow for default value for the setting # add to class and serializer to allow for default value for the setting
add_to_class(:user, :see_signatures) do add_to_class(:user, :see_signatures) do