FIX: Do not mark group_flair images as secure on upload (#12081)

See https://meta.discourse.org/t/secure-media-uploads-breaks-group-flair-image/173671/4

Group flair image uploads definitely do not need to be secure.
This commit is contained in:
Martin Brennan
2021-02-16 12:34:03 +10:00
committed by GitHub
parent c0c7c237aa
commit 9f0f801ae3
4 changed files with 45 additions and 4 deletions

View File

@@ -25,6 +25,12 @@ RSpec.describe UploadSecurity do
end
context "when uploading in public context" do
describe "for a public type group_flair" do
let(:type) { 'group_flair' }
it "returns false" do
expect(subject.should_be_secure?).to eq(false)
end
end
describe "for a public type avatar" do
let(:type) { 'avatar' }
it "returns false" do