Skip to content

Commit

Permalink
Merge pull request #33 from markjaquith/security
Browse files Browse the repository at this point in the history
Use a token when escaping the add_order_item query. props @joncave
  • Loading branch information
markjaquith committed Sep 30, 2011
2 parents ed5b4b0 + 278b87d commit 2a5d731
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions woocommerce_actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ function woocommerce_add_order_item() {
WHERE $wpdb->postmeta.meta_key = 'sku'
AND $wpdb->posts.post_status = 'publish'
AND $wpdb->posts.post_type = 'shop_product'
AND $wpdb->postmeta.meta_value = '".$item_to_add."'
AND $wpdb->postmeta.meta_value = %s
LIMIT 1
"));
"), $item_to_add );
$post = get_post( $post_id );
endif;

Expand Down Expand Up @@ -1001,4 +1001,4 @@ function woocommerce_ecommerce_tracking( $order_id ) {
})();
</script>
<?php
}
}

0 comments on commit 2a5d731

Please sign in to comment.