discourse/spec
Martin Brennan cdc8e9de1b
FIX: Post uploads setting access_control_post_id unnecessarily (#26627)
This commit addresses an issue for sites where secure_uploads
is turned on after the site has been operating without it for
some time.

When uploads are linked when they are used inside a post,
we were setting the access_control_post_id unconditionally
if it was NULL to that post ID and secure_uploads was true.

However this causes issues if an upload has been used in a
few different places, especially if a post was previously
used in a PM and marked secure, so we end up with a case of
the upload using a public post for its access control, which
causes URLs to not use the /secure-uploads/ path in the post,
breaking things like image uploads.

We should only set the access_control_post_id if the post is the first time the
upload is referenced so it cannot hijack uploads from other places.
2024-04-16 10:37:57 +10:00
..
fabricators DEV: Make all admins TL4 in tests (#25435) 2024-03-26 11:41:12 +08:00
fixtures DEV: Support translations for property labels in objects schema editor (#26362) 2024-03-28 10:53:51 +08:00
generator DEV: Silence the output of migration specs (#26365) 2024-03-26 11:32:44 +01:00
helpers DEV: early hints around_action -> after_action (#26423) 2024-04-04 14:37:44 +01:00
import_export DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
initializers DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
integration FIX: Post uploads setting access_control_post_id unnecessarily (#26627) 2024-04-16 10:37:57 +10:00
integrity Enable Embroider/Webpack code spliting for Wizard (#24919) 2023-12-20 13:15:06 +00:00
jobs UX: make first admin a moderator to review user approvals. (#26588) 2024-04-10 20:59:03 +05:30
lib FIX: Post uploads setting access_control_post_id unnecessarily (#26627) 2024-04-16 10:37:57 +10:00
mailers FIX: Ensure invalid timezone does not block critical emails (#26607) 2024-04-12 10:53:44 -04:00
migrations DEV: Silence the output of migration specs (#26365) 2024-03-26 11:32:44 +01:00
models FIX: Post uploads setting access_control_post_id unnecessarily (#26627) 2024-04-16 10:37:57 +10:00
multisite DEV: Add S3 upload system specs using minio (#22975) 2023-08-23 11:18:33 +10:00
requests UX: make first admin a moderator to review user approvals. (#26588) 2024-04-10 20:59:03 +05:30
script/import_scripts DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
serializers DEV: Drop FoundUserWithStatusSerializer (#25884) 2024-04-12 15:08:07 +04:00
services FEATURE: Consolidate link notifications (#26567) 2024-04-09 11:53:37 -06:00
support DEV: Move chat service objects into core (#26506) 2024-04-04 10:57:41 -03:00
system FIX: Wait for bookmark save before allowing menu button click (#26626) 2024-04-15 14:45:11 +02:00
tasks DEV: Introduce rake task to validate discourse-compatibility file (#26158) 2024-03-13 13:57:41 +00:00
views FEATURE: Simplify crawler content for non-canonical post URLs (#26324) 2024-03-26 15:18:46 +00:00
rails_helper.rb DEV: Move more service code to core (#26613) 2024-04-12 13:14:19 +02:00
regenerate_swagger_docs
swagger_helper.rb DEV: Bump rswag-specs from 2.11.0 to 2.13.0 (#24654) 2023-12-07 08:16:47 +08:00