mirror of
https://github.com/redmine/redmine.git
synced 2026-07-20 03:12:02 +02:00
Validate attachment filenames on every change (#34367).
Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@20946 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -107,7 +107,7 @@ module Redmine
|
||||
end
|
||||
next unless a
|
||||
a.description = attachment['description'].to_s.strip
|
||||
if a.new_record?
|
||||
if a.new_record? || a.invalid?
|
||||
unsaved_attachments << a
|
||||
else
|
||||
saved_attachments << a
|
||||
|
||||
Reference in New Issue
Block a user