mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Change secure media to encompass attachments as well (#9271)
If the “secure media” site setting is enabled then ALL files uploaded to Discourse (images, video, audio, pdf, txt, zip etc. etc.) will follow the secure media rules. The “prevent anons from downloading files” setting will no longer have any bearing on upload security. Basically, the feature will more appropriately be called “secure uploads” instead of “secure media”. This is being done because there are communities out there that would like all attachments and media to be secure based on category rules but still allow anonymous users to download attachments in public places, which is not possible in the current arrangement.
This commit is contained in:
@@ -379,9 +379,8 @@ class PostCreator
|
||||
end
|
||||
|
||||
def update_uploads_secure_status
|
||||
if SiteSetting.secure_media? || SiteSetting.prevent_anons_from_downloading_files?
|
||||
@post.update_uploads_secure_status
|
||||
end
|
||||
return if !SiteSetting.secure_media?
|
||||
@post.update_uploads_secure_status
|
||||
end
|
||||
|
||||
def handle_spam
|
||||
|
||||
Reference in New Issue
Block a user