66 function commerce_paypal_process_ipn($payment_method = NULL, $debug_ipn = array()) {
...
74     foreach ($ipn as $key => $value) {
75       $variables[] = $key . '=' . urlencode(stripslashes($value));
76     }

According to the Paypal Instant Payment Notification Guide p. 20, stripslashes should only be invoked on values when gpc_magic_quotes == 1 .

Drupal should already stripslashes automatically when this is the case.

Comments

andyg5000’s picture

Status: Active » Needs review
StatusFileSize
new613 bytes

Patch attached

rszrama’s picture

Status: Needs review » Fixed

Actually, I think the idea is that we don't need to worry about stripslashes() at all. _drupal_bootstrap_full() calls fix_gpc_magic(), which in turn walks over various superglobal arrays stripping slashes left and right. So looking at PayPal's example, everything they do to detect magic quotes is being done by Drupal automatically. We can simply remove the call to stripslashes() and be satisfied.

Commit: http://drupalcode.org/project/commerce_paypal.git/commitdiff/103ae02

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.