Plugin Directory

Changeset 2971647


Ignore:
Timestamp:
09/26/2023 06:43:47 AM (3 years ago)
Author:
integrationdevpaytm
Message:

Security Updates

Location:
paytm-donation/trunk
Files:
9 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • paytm-donation/trunk/includes/PaytmConstantsDonation.php

    r2969182 r2971647  
    1515    CONST APPEND_TIMESTAMP                      = true;
    1616    CONST X_REQUEST_ID                          = "PLUGIN_WORDPRESS_";
    17     CONST PLUGIN_VERSION_FOLDER                 = "224";
     17    CONST PLUGIN_VERSION_FOLDER                 = "225";
    1818
    1919    CONST MAX_RETRY_COUNT                       = 3;
     
    2121    CONST TIMEOUT                               = 10;
    2222
    23     CONST LAST_UPDATED                          = "20230920";
    24     CONST PLUGIN_VERSION                        = "2.2.4";
     23    CONST LAST_UPDATED                          = "20230925";
     24    CONST PLUGIN_VERSION                        = "2.2.5";
    2525    CONST PLUGIN_DOC_URL                        = "https://business.paytm.com/docs/wordpress/";
    2626
  • paytm-donation/trunk/includes/PaytmHelper.php

    r2967076 r2971647  
    229229            {
    230230                global $wpdb;
    231                 return $wpdb->query("SELECT * FROM ". ($site_wide ? $wpdb->base_prefix : $wpdb->prefix). "options WHERE option_name ='$name' LIMIT 1");
     231                return $wpdb->query($wpdb->prepare("SELECT * FROM ". ($site_wide ? $wpdb->base_prefix : $wpdb->prefix). "options WHERE option_name ='$name' LIMIT 1"));
    232232            }
    233233
  • paytm-donation/trunk/paytm-donation.php

    r2969182 r2971647  
    44 * Plugin URI: https://business.paytm.com/docs/wordpress/
    55 * Description: This plugin allow you to accept donation payments using Paytm. This plugin will add a simple form that user will fill, when he clicks on submit he will redirected to Paytm website to complete his transaction and on completion his payment, paytm will send that user back to your website along with transactions details. This plugin uses server-to-server verification to add additional security layer for validating transactions. Admin can also see all transaction details with payment status by going to "Paytm Payment Details" from menu in admin.
    6  * Version: 2.2.4
     6 * Version: 2.2.5
    77 * Author: Paytm
    88 * Author URI: https://business.paytm.com/payment-gateway
     
    905905       
    906906        $status             = (!empty($data['STATUS']) && $data['STATUS'] =='TXN_SUCCESS') ? 1 : 0;
    907         $paytm_order_id     = (!empty($data['ORDERID'])? $data['ORDERID']:'');
    908         $transaction_id     = (!empty($data['TXNID'])? $data['TXNID']:'');
     907        $paytm_order_id     = (!empty($data['ORDERID'])? $data['ORDERID']:0);
     908        $transaction_id     = (!empty($data['TXNID'])? $data['TXNID']:0);
    909909       
    910910        if($id !== false){
    911             $sql = $wpdb->update(
    912                     $wpdb->prefix . 'paytm_donation_order_data',
    913                     array(
    914                         'order_id' => $order_id,
    915                         'paytm_order_id' => $paytm_order_id,
    916                         'transaction_id' => $transaction_id,
    917                         'status' => (int)$status,
    918                         'paytm_response' => json_encode($data),
    919                         'date_modified' => current_time('mysql', 1),
    920                     ),
    921                     array(
    922                         'id' => (int)$id,
    923                         'paytm_order_id' => $paytm_order_id,
    924                     ),
    925                     array(
    926                         '%s',
    927                         '%s',
    928                         '%s',
    929                         '%s',
    930                         '%s',
    931                         '%s',
    932                     ),
    933                     array(
    934                         '%d',
    935                         '%s',
    936                     )
    937                 );
    938             $wpdb->query($wpdb->prepare($sql));
     911            $wpdb->query(
     912                $wpdb->prepare("UPDATE {$wpdb->prefix}paytm_donation_order_data SET order_id = %s,
     913                        paytm_order_id = %s,
     914                        transaction_id = %s,
     915                        status = %s,
     916                        paytm_response = %s,
     917                        date_modified = NOW()
     918                    WHERE id = %d AND paytm_order_id = %s",
     919                    $order_id,
     920                    $paytm_order_id,
     921                    $transaction_id,
     922                    (int)$status,
     923                    json_encode($data),
     924                    (int)$id,
     925                    $paytm_order_id
     926                )
     927            );
    939928            return $id;
    940929        }else{
  • paytm-donation/trunk/readme.txt

    r2969182 r2971647  
    55Requires at least: 4.9
    66Tested up to: 6.2.2
    7 Stable tag: 2.2.4
     7Stable tag: 2.2.5
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2828
    2929== Changelog ==
     30
     31= 2.2.5 =
     32* Security Fixes
    3033
    3134= 2.2.4 =
Note: See TracChangeset for help on using the changeset viewer.