FIX: validates attachments against current authorized extensions

This commit is contained in:
Régis Hanol
2017-11-07 19:17:33 +01:00
parent 4f0bdec370
commit be0c7609f1
3 changed files with 35 additions and 1 deletions

View File

@@ -381,6 +381,10 @@ describe Email::Receiver do
SiteSetting.authorized_extensions = "txt"
expect { process(:attached_txt_file) }.to change { topic.posts.count }
expect(topic.posts.last.raw).to match(/text\.txt/)
SiteSetting.authorized_extensions = "csv"
expect { process(:attached_txt_file_2) }.to change { topic.posts.count }
expect(topic.posts.last.raw).to_not match(/text\.txt/)
end
it "supports liking via email" do