diff options
author | Mislav Marohnić <mislav.marohnic@gmail.com> | 2009-01-20 12:38:25 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-01-20 12:38:25 -0600 |
commit | 01f06fc7f4dda52035d5a2273d402d8555a897a5 (patch) | |
tree | f565edb0adde7dcb43d09b7e043d3aa827ce1d46 /actionpack/lib/action_controller | |
parent | c090e5e0755bea3a7cd7135329f8dae6094810b6 (diff) | |
download | rails-01f06fc7f4dda52035d5a2273d402d8555a897a5.tar.gz rails-01f06fc7f4dda52035d5a2273d402d8555a897a5.tar.bz2 rails-01f06fc7f4dda52035d5a2273d402d8555a897a5.zip |
Don't let empty Tempfiles come through as uploaded files [#1785 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/url_encoded_pair_parser.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/url_encoded_pair_parser.rb b/actionpack/lib/action_controller/url_encoded_pair_parser.rb index b63dca987d..93ab2255da 100644 --- a/actionpack/lib/action_controller/url_encoded_pair_parser.rb +++ b/actionpack/lib/action_controller/url_encoded_pair_parser.rb @@ -46,7 +46,7 @@ module ActionController when Array value.map { |v| get_typed_value(v) } when Hash - if value.has_key?(:tempfile) + if value.has_key?(:tempfile) && value[:tempfile].size > 0 upload = value[:tempfile] upload.extend(UploadedFile) upload.original_path = value[:filename] |