From fde6558a6faeafd2e19d0870f7b2c1202b8aece4 Mon Sep 17 00:00:00 2001 From: HungryFeline Date: Wed, 1 Jan 2014 01:41:11 +0100 Subject: [PATCH] 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 --- core/extension.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/extension.class.php b/core/extension.class.php index a1175341..0b4c767b 100644 --- a/core/extension.class.php +++ b/core/extension.class.php @@ -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) {