Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
dvg_payment_webform adds a full $form and $form_state to the payment entity property context_data. This both makes the entries in the database pretty large, as well as lacks the proper encryption for the input values and most likely is unnecessary.
On a high activity site this results quickly in a >500MB payment table.
Comment | File | Size | Author |
---|---|---|---|
#2 | dvg-payment-webform_reduce-context-size-and-encrypt-values-2867005-2.patch | 3.73 KB | paulvandenburg |
Comments
Comment #2
paulvandenburg CreditAttribution: paulvandenburg at ezCompany commentedThis patch reduces the average size from +- 35KB to +-900B.
$form and $form_state are removed from the context. Since they are still used in the finallize submit callback I've moved them to the $_SESSION, which already gets reset after the payment is complete.
To not remove possibly valuable info I've added the submission to the context instead. The submission is encrypted before saving to not expose possibly sensitive user data.
Comment #3
mvwensen CreditAttribution: mvwensen commentedGreat patch, especially the part where you add the encryption.
Patch applies and does it's job.
Comment #5
ralphvdhoudt CreditAttribution: ralphvdhoudt at ezCompany commented