Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

Commit

Permalink
[VULN] Fixing #53
Browse files Browse the repository at this point in the history
  • Loading branch information
jumph4x committed Apr 12, 2013
1 parent 38cb290 commit 1e15645
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/spree/checkout_controller_decorator.rb
Expand Up @@ -11,12 +11,16 @@ def set_addresses

if params[:order][:ship_address_id].to_i > 0
params[:order].delete(:ship_address_attributes)

Spree::Address.find(params[:order][:ship_address_id]).user_id != spree_current_user.id && raise("Frontend address forging")
else
params[:order].delete(:ship_address_id)
end

if params[:order][:bill_address_id].to_i > 0
params[:order].delete(:bill_address_attributes)

Spree::Address.find(params[:order][:bill_address_id]).user_id != spree_current_user.id && raise("Frontend address forging")
else
params[:order].delete(:bill_address_id)
end
Expand Down

0 comments on commit 1e15645

Please sign in to comment.