Harden Security Update - #2
Open
Abraham-Flutterwave wants to merge 3 commits into
Open
Abraham-Flutterwave wants to merge 3 commits into
Abraham-Flutterwave wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Payment security
handleReturnis removed from the public routes and uses GiveWP's signed URL.tx_refmust equal a reference saved for that donation, and the amount and currency must match. A small payment can no longer complete a bigger donation.webhookNotificationsListener()method GiveWP calls (it was never reached before). It needs a secret hash of 16+ characters in theverif-hashheader, and every result is re-checked with the Flutterwave API.Bugs fixed along the way
formatToDecimal().referenceinstead of v3'stx_ref.getWebhookUrl()called a method that doesn't exist.Data and logs
api_keyfields, and the settings page shows the webhook URL.uninstall.phpdeletes all keys and locks.Packaging and cleanup
.distignoreandindex.phpfiles were added. Test files only run from the command line.flutterwave-inline.jsandgetTransactionUrl().give_flutterwave_prefix. The currency list lives in one constant.composer.jsonnow says PHP 7.4+, matching the plugin header.Tests
They went from 6 to 41. New files are
ReturnRouteTest.phpandTestState.php, andGatewayTest.phpandWebhookTest.phpwere expanded.