From 3eeadc922a669af9b4df4a41dc464bf6587802c1 Mon Sep 17 00:00:00 2001 From: Jakob Kramer Date: Thu, 2 Jun 2011 17:47:38 +0200 Subject: [PATCH] add changes in mediagoblin/submit/views.py --- mediagoblin/submit/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mediagoblin/submit/views.py b/mediagoblin/submit/views.py index 262f2b12..5ddf992f 100644 --- a/mediagoblin/submit/views.py +++ b/mediagoblin/submit/views.py @@ -21,7 +21,7 @@ from webob import Response, exc from werkzeug.utils import secure_filename from mediagoblin.decorators import require_active_login -from mediagoblin.submit import forms as submit_forms +from mediagoblin.submit import forms as submit_forms, security from mediagoblin.process_media import process_media_initial @@ -38,6 +38,9 @@ def submit_start(request): and request.POST['file'].file): submit_form.file.errors.append( u'You must provide a file.') + elif not security.check_filetype(request.POST['file']): + submit_form.file.errors.append( + u'The file doesn\'t seem to be an image!') else: filename = request.POST['file'].filename -- 2.25.1