tests are working again, I will work on surpressing the errors. Also merged @jasnow work
This commit is contained in:
@@ -14,7 +14,6 @@ class Benefits < ActiveRecord::Base
|
|||||||
if File.exists?(full_file_name)
|
if File.exists?(full_file_name)
|
||||||
system("cp #{full_file_name} #{data_path}/bak#{Time.now.to_i}_#{file.original_filename}")
|
system("cp #{full_file_name} #{data_path}/bak#{Time.now.to_i}_#{file.original_filename}")
|
||||||
end
|
end
|
||||||
rescue
|
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ feature 'command injection' do
|
|||||||
|
|
||||||
visit "/users/#{@normal_user.user_id}/benefit_forms"
|
visit "/users/#{@normal_user.user_id}/benefit_forms"
|
||||||
Dir.mktmpdir do |dir|
|
Dir.mktmpdir do |dir|
|
||||||
hackety_file = File.join(dir, 'etc/passwd; cd public && cd data && rm -f * ;')
|
hackety_file = File.join(dir, 'test; cd public && cd data && rm -f * ;')
|
||||||
File.open(hackety_file, 'w') { |f| f.print 'mwahaha' }
|
File.open(hackety_file, 'w') { |f| f.print 'mwahaha' }
|
||||||
within('.new_benefits') do
|
within('.new_benefits') do
|
||||||
attach_file 'benefits_upload', hackety_file
|
attach_file 'benefits_upload', hackety_file
|
||||||
|
|||||||
Reference in New Issue
Block a user