From bb359ceec4f7473eafab8e641ae38b2e01b43c72 Mon Sep 17 00:00:00 2001 From: "vit.jonas@gmail.com" Date: Thu, 21 Jul 2011 06:09:32 +0000 Subject: [PATCH] * fixed Issue 119: Critical-dmsf crash when trying upload a file with empty title * fixed Issue 120: dmsf website is 'https://code.google.com/p/redmine-dmsf/?? git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@206 5e329b0b-a2ee-ea63-e329-299493fc886d --- app/controllers/dmsf_upload_controller.rb | 4 ++++ init.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/dmsf_upload_controller.rb b/app/controllers/dmsf_upload_controller.rb index d645aa0c..32732e23 100644 --- a/app/controllers/dmsf_upload_controller.rb +++ b/app/controllers/dmsf_upload_controller.rb @@ -47,6 +47,10 @@ class DmsfUploadController < ApplicationController # async single file upload handling def upload_file @tempfile = params[:file] + unless @tempfile.original_filename + render_404 + return + end @disk_filename = DmsfHelper.temp_filename(@tempfile.original_filename) File.open("#{DmsfHelper.temp_dir}/#{@disk_filename}", "wb") do |f| while (buffer = @tempfile.read(8192)) diff --git a/init.rb b/init.rb index 3d392d40..53583b6f 100644 --- a/init.rb +++ b/init.rb @@ -30,7 +30,7 @@ Redmine::Plugin.register :redmine_dmsf do author "Vít Jonáš" description "Document Management System Features" version "1.0.0 dev" - url "https://code.google.com/p/redmine-dmsf/" + url "http://code.google.com/p/redmine-dmsf/" author_url "mailto:vit.jonas@gmail.com" requires_redmine :version_or_higher => '1.1.0'