Don't silently ignore invalid URLs

Scenario: Providing an invalid url via $_GET (wrong/missing extension or file isn't an image (also happens on download errors))
Behavior before: Silently redirect to index
Behavior after: Display error message
This commit is contained in:
HungryFeline 2014-01-01 01:41:11 +01:00
parent 2d40fcc92d
commit fde6558a6f

View File

@ -197,6 +197,9 @@ abstract class DataHandlerExtension extends Extension {
} }
} }
} }
else{
throw new UploadException("Unsupported extension or file isn't an image");
}
} }
public function onThumbnailGeneration(ThumbnailGenerationEvent $event) { public function onThumbnailGeneration(ThumbnailGenerationEvent $event) {