Skip to content

Commit

Permalink
Fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
hortongn committed Aug 17, 2015
2 parents 6e06ded + e52c4d8 commit 4659b1d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions app/helpers/params_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,30 @@ def check_parameters?(params_to_check=[:page, :per_page])

end

def check_blind_sql_parameters_loop?()
params.clone.each do |key, value|
if value.is_a?(Hash)
value.clone.each do |k,v|
unless defined?(v) == nil
if v.to_s.include?('waitfor delay') || v.to_s.include?('DBMS_LOCK.SLEEP') || v.to_s.include?('SLEEP(5)') || v.to_s.include?('SLEEP(10)')
render(:file => File.join(Rails.root, 'public/404.html'), :status => 404)
return false
break
end
end
end
else
unless defined?(value) == nil
if value.to_s.include?('waitfor delay') || value.to_s.include?('DBMS_LOCK.SLEEP') || value.to_s.include?('SLEEP(5)') || value.to_s.include?('SLEEP(10)')
render(:file => File.join(Rails.root, 'public/404.html'), :status => 404)
return false
break
end
end
end
end
end

protected

def limit_param_length(parameter, length_limit)
Expand Down

0 comments on commit 4659b1d

Please sign in to comment.