SECURITY: force IM decoder based on file extension

This commit is contained in:
Régis Hanol
2018-07-25 22:00:04 +02:00
parent 0e84024958
commit 4bf3bf6786
3 changed files with 46 additions and 15 deletions

View File

@ -93,7 +93,7 @@ describe OptimizedImage do
}.not_to raise_error
end
it "raises nothing on paths" do
it "raises InvalidAccess error on paths" do
expect {
OptimizedImage.ensure_safe_paths!("/a.png", "/b.png", "c.png")
}.to raise_error(Discourse::InvalidAccess)