Skip to content

Commit 2663da2

Browse files
committed
4.0.2 Security Fixes.
1 parent 2f12e75 commit 2663da2

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

includes/classes/class-helpers.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ public function get_payments_by_id( $form_id = 0, $args = array() ) {
189189
$current_version = get_bloginfo('version');
190190
if ( version_compare( '6.2', $current_version, '<=' ) ) {
191191

192+
// Make sure $order only handles 2 possible values.
193+
if ( 'ASC' !== $order ) {
194+
$order = 'DESC';
195+
}
196+
192197
// phpcs:disable WordPress.DB -- Start ignoring
193198
$results = $wpdb->get_results(
194199
$wpdb->prepare(
@@ -200,7 +205,7 @@ public function get_payments_by_id( $form_id = 0, $args = array() ) {
200205
$table,
201206
$form_id,
202207
$args['paid'],
203-
$args['orderby'],
208+
$args['orderby']
204209
)
205210
);
206211
// phpcs:enable -- Stop ignoring
@@ -214,11 +219,12 @@ public function get_payments_by_id( $form_id = 0, $args = array() ) {
214219
FROM `%s`
215220
WHERE post_id = '%d'
216221
AND paid = '%s'
217-
ORDER BY '%s' $order",
222+
ORDER BY '%s' %s",
218223
$table,
219224
$form_id,
220225
$args['paid'],
221226
$args['orderby'],
227+
$order
222228
)
223229
);
224230
// phpcs:enable -- Stop ignoring

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pff-paystack",
3-
"version": "4.0.1",
3+
"version": "4.0.2",
44
"description": "Paystack Payment forms for WordPress",
55
"main": "gulpfile.js",
66
"scripts": {

paystack-forms.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Payment Forms for Paystack
44
Plugin URI: https://github.com/PaystackHQ/Wordpress-Payment-forms-for-Paystack
55
Description: Payment Forms for Paystack allows you create forms that will be used to bill clients for goods and services via Paystack.
6-
Version: 4.0.1
6+
Version: 4.0.2
77
Author: Paystack
88
Author URI: http://paystack.com
99
License: GPL-2.0+
@@ -16,7 +16,7 @@
1616
define( 'PFF_PAYSTACK_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
1717
define( 'PFF_PAYSTACK_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
1818
define( 'PFF_PAYSTACK_MAIN_FILE', __FILE__ );
19-
define( 'PFF_PAYSTACK_VERSION', '4.0.1' );
19+
define( 'PFF_PAYSTACK_VERSION', '4.0.2' );
2020
define( 'PFF_PAYSTACK_TABLE', 'paystack_forms_payments' );
2121
define( 'PFF_PLUGIN_BASENAME', plugin_basename(__FILE__) );
2222
define( 'PFF_PLUGIN_NAME', 'pff-paystack' );

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://paystack.com/demo
44
Tags: paystack, recurrent payments, donation, forms, payments
55
Requires at least: 5.0
66
Tested up to: 6.7
7-
Stable tag: 4.0.1
7+
Stable tag: 4.0.2
88
Requires PHP: 7.4
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -91,6 +91,9 @@ If you get stuck, you can ask for help in the [Payment Forms for Paystack Plugin
9191
Yes you can! Join in on our [GitHub repository](https://github.com/PaystackOSS/plugin-payment-forms-for-wordpress) :)
9292

9393
== Changelog ==
94+
= 4.0.2 =
95+
* Security Update - Adding in sanitization to the Payments List order variable.
96+
9497
= 4.0.1 =
9598
* Updating the class initiation to be 7.4 compatible and additional 7.4 fixes
9699
* Fixing the split transaction field

0 commit comments

Comments
 (0)