AlternativeCommerce PayPal Checkout
The module does not properly check incoming messages from the payment service. Anyone could send a fake message to mark an order as paid without actually spending any money. They would not be able to view hidden information.
- Who could do thisAnyone visiting the site. No login needed.
- Does it apply to youAny site using this module.
- Has it been used in attacksNo sign of it.
- How urgentDrupal rates this moderately critical. Include it in your next routine update, within the month.
Tell your developerUpdate AlternativeCommerce PayPal Checkout to 1.1.1.
For developers: what the fix changed
The fix adds webhook signature verification in `src/PayPal.php` and `src/Controller/Pages.php` to ensure requests originate from PayPal. It also introduces strict validation in `src/Controller/ApiPage.php` and `src/PayPal.php` to ensure the PayPal order details match the local payment record before marking an order as paid.
Also in this release Added webhook ID configuration, improved session handling for checkout snapshots, and added unit tests.
basket_paypal.libraries.yml+5 −0config/install/basket_paypal.settings.yml+2 −0src/Controller/ApiPage.php+209 −50 fixsrc/Controller/Pages.php+132 −82 fixsrc/Form/PaymentForm.php+61 −12src/Form/SettingsForm.php+22 −5src/PayPal.php+137 −1 fixsrc/Services/PayPalJs.php+14 −3templates/basket-paypal-buttons.html.twig+1 −0