discourse/spec
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
..
fabricators FIX: Issues with incorrect unread and private message topic tracking state (#16474) 2022-04-19 11:37:01 +10:00
fixtures FIX: Support new layout on Amazon product pages (#16091) 2022-03-04 18:31:53 -05:00
helpers FIX: include crawler content on old mobile browsers (#16387) 2022-04-06 11:09:12 +01:00
import_export DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
initializers DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
integration FEATURE: Allow multiple required tag groups for a category (#16381) 2022-04-06 14:08:06 +01:00
integrity DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
jobs FIX: Skip upload extension validation when changing security (#16498) 2022-04-20 14:11:39 +10:00
lib FIX: Skip upload extension validation when changing security (#16498) 2022-04-20 14:11:39 +10:00
mailers REFACTOR: Add `full_url` to `Group` 2022-04-14 11:53:57 +02:00
models FIX: Skip upload extension validation when changing security (#16498) 2022-04-20 14:11:39 +10:00
multisite DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
requests FEATURE: Block indexing the embed topic list (#16495) 2022-04-19 18:24:38 -03:00
script/import_scripts DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
serializers FEATURE: add `user_suspended` attribute in post serialize. (#16413) 2022-04-13 19:58:09 +05:30
services FEATURE: Improve screened IPs roll up and extend for IPv6 (#15585) 2022-04-12 21:07:37 +03:00
support FEATURE: Add 2FA support to the Discourse Connect Provider protocol (#16386) 2022-04-13 15:04:09 +03:00
tasks DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
views FEATURE: add nofollow to RSS alternate link in topics and categories (#16013) 2022-03-09 16:34:02 +11:00
rails_helper.rb PERF: perform all cached counting in background (#15991) 2022-02-22 16:45:25 +00:00
regenerate_swagger_docs DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
swagger_helper.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00