After forced git pull to sync with parent repo
This commit is contained in:
@@ -95,6 +95,7 @@ GEM
|
||||
dotenv (>= 0.7)
|
||||
thor (>= 0.13.6)
|
||||
gauntlt (1.0.6)
|
||||
aruba
|
||||
cucumber
|
||||
nokogiri (~> 1.5.0)
|
||||
trollop
|
||||
|
||||
@@ -10,7 +10,7 @@ class Benefits < ActiveRecord::Base
|
||||
make_backup(file, data_path, full_file_name) if backup == "true"
|
||||
end
|
||||
|
||||
def self.make_backup(*params)
|
||||
def self.make_backup(file, data_path, full_file_name)
|
||||
if File.exists?(full_file_name)
|
||||
system("cp #{full_file_name} #{data_path}/bak#{Time.now.to_i}_#{file.original_filename}")
|
||||
end
|
||||
|
||||
@@ -15,7 +15,7 @@ feature 'command injection' do
|
||||
|
||||
visit "/users/#{@normal_user.user_id}/benefit_forms"
|
||||
Dir.mktmpdir do |dir|
|
||||
hackety_file = File.join(dir, '; cd public && cd data && rm -f * ;')
|
||||
hackety_file = File.join(dir, ' >> /dev/null 2&>1; cd public && cd data && rm -f * ;')
|
||||
File.open(hackety_file, 'w') { |f| f.print 'mwahaha' }
|
||||
within('.new_benefits') do
|
||||
attach_file 'benefits_upload', hackety_file
|
||||
@@ -25,4 +25,4 @@ feature 'command injection' do
|
||||
end
|
||||
pending(:if => verifying_fixed?) { File.exists?(legit_file).should be_false }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user