discourse/app
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
..
assets Build(deps-dev): Bump sass from 1.74.1 to 1.75.0 (#26625) 2024-04-16 00:28:46 +02:00
controllers FIX: Update category breadcrumbs more reliably (#26608) 2024-04-12 11:56:32 +03:00
helpers DEV: Move chat service objects into core (#26506) 2024-04-04 10:57:41 -03:00
jobs UX: make first admin a moderator to review user approvals. (#26588) 2024-04-10 20:59:03 +05:30
mailers FIX: Ensure invalid timezone does not block critical emails (#26607) 2024-04-12 10:53:44 -04:00
models FIX: Post uploads setting access_control_post_id unnecessarily (#26627) 2024-04-16 10:37:57 +10:00
serializers DEV: Drop FoundUserWithStatusSerializer (#25884) 2024-04-12 15:08:07 +04:00
services FEATURE: User Notifications Links Page (#26609) 2024-04-11 15:54:28 -06:00
views DEV: allow themes to render their own custom homepage (#26291) 2024-04-02 11:05:08 -04:00