Page MenuHomePhabricator

🐛 Bug | Direct donations from Paypal have wrong encoding
Open, Needs TriagePublic

Description

During the investigation of T266530: 🐛 Bug | Fix Donation List Error in Ops Centre we encountered donations that had non-UTF-8 encoding, causing errors when calling json_encode without JSON_INVALID_UTF8_IGNORE and causing the characters to miss in the display. All the donations have in common that they are coming from PayPal and have no associated tracking code. This means, that someone sent money "directly" to wikimedia from their paypal account, without using the donation form. In those cases, we use the address data that PayPal sends us.

We have several ways to avoid the error:

  1. Create anonymous donations when someone sends money directly
  2. Pre-process the input in the controllers, converting the strings to UTF-8 encoding
  3. Change the Paypal IPN settings to send us UTF-8 encoded data. This StackOverflow answer makes it look like that might be quite involved.

Implementation notes:
When this bug is fixed, the quickfix for the encoding error - adding JSON_INVALID_UTF8_IGNORE to Backend_AjaxController should be removed.

Event Timeline

Restricted Application added a project: WMDE-FUN-Team. · View Herald TranscriptOct 27 2020, 5:30 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript