discourse/lib/validators
Martin Brennan 154afa60eb
FIX: Skip upload extension validation when changing security (#16498)
When changing upload security using `Upload#update_secure_status`,
we may not have the context of how an upload is being created, because
this code path can be run through scheduled jobs. When calling
update_secure_status, the normal ActiveRecord validations are run,
and ours include validating extensions. In some cases the upload
is created in an automated way, such as user export zips, and the
security is applied later, with the extension prohibited from
use when normally uploading.

This caused the upload to fail validation on `update_secure_status`,
causing the security change to silently fail. This fixes the issue
by skipping the file extension validation when the upload security
is being changed.
2022-04-20 14:11:39 +10:00
..
allow_user_locale_enabled_validator.rb
allowed_ip_address_validator.rb
alternative_reply_by_email_addresses_validator.rb
categories_topics_validator.rb
category_search_priority_weights_validator.rb
censored_words_validator.rb
color_list_validator.rb
css_color_validator.rb
email_address_validator.rb DEV: pull email address validation out to a new EmailAddressValidator 2022-02-17 21:49:22 -05:00
email_setting_validator.rb DEV: pull email address validation out to a new EmailAddressValidator 2022-02-17 21:49:22 -05:00
email_validator.rb DEV: pull email address validation out to a new EmailAddressValidator 2022-02-17 21:49:22 -05:00
enable_invite_only_validator.rb
enable_local_logins_via_email_validator.rb
enable_private_email_messages_validator.rb
enable_sso_validator.rb
external_system_avatars_validator.rb
google_oauth2_hd_groups_validator.rb
group_setting_validator.rb
host_list_setting_validator.rb FEATURE: Validate domain settings for blocked_onebox_domain only (#15754) 2022-02-03 11:26:53 +08:00
integer_setting_validator.rb
ip_address_format_validator.rb
markdown_linkify_tlds_validator.rb validate markdown_linkify_tlds setting (#16485) 2022-04-15 10:14:28 -05:00
markdown_typographer_quotation_marks_validator.rb
max_emojis_validator.rb
max_username_length_validator.rb
min_username_length_validator.rb
not_username_validator.rb
password_validator.rb
pop3_polling_enabled_setting_validator.rb DEV: Use EmailSettingsValidator in more places (#15404) 2022-01-04 08:30:48 +10:00
post_validator.rb
quality_title_validator.rb
regex_presence_validator.rb
regex_setting_validation.rb
regex_setting_validator.rb
reply_by_email_address_validator.rb FIX: ReplyByEmailAddressValidator should leverage EmailAddressValidator 2022-02-17 21:49:22 -05:00
reply_by_email_enabled_validator.rb
search_tokenize_chinese_validator.rb FEATURE: Split up text segmentation for Chinese and Japanese. 2022-02-07 09:21:14 +08:00
search_tokenize_japanese_validator.rb FEATURE: Split up text segmentation for Chinese and Japanese. 2022-02-07 09:21:14 +08:00
selectable_avatars_mode_validator.rb FEATURE: upload an avatar option for uploading avatars with selectable avatars (#15878) 2022-02-24 12:57:39 -08:00
sso_overrides_email_validator.rb
string_setting_validator.rb
stripped_length_validator.rb
timezone_validator.rb
topic_title_length_validator.rb
unicode_username_allowlist_validator.rb
unicode_username_validator.rb
unique_among_validator.rb
upload_validator.rb FIX: Skip upload extension validation when changing security (#16498) 2022-04-20 14:11:39 +10:00
url_validator.rb
user_full_name_validator.rb
username_setting_validator.rb
watched_words_validator.rb