Plugin Directory

Changeset 3205102


Ignore:
Timestamp:
12/09/2024 07:59:28 PM (16 months ago)
Author:
depayfi
Message:

Update to version 2.12.18 from GitHub

Location:
depay-payments-for-woocommerce
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • depay-payments-for-woocommerce/tags/2.12.18/depay-woocommerce-payments.php

    r3204303 r3205102  
    1212 * Requires at least: 5.8
    1313 * Requires PHP: 7.0
    14  * Version: 2.12.17
     14 * Version: 2.12.18
    1515 *
    1616 * @package DePay\Payments
     
    2222define( 'DEPAY_WC_ABSPATH', __DIR__ . '/' );
    2323define( 'DEPAY_MIN_WC_ADMIN_VERSION', '0.23.2' );
    24 define( 'DEPAY_CURRENT_VERSION', '2.12.17' );
     24define( 'DEPAY_CURRENT_VERSION', '2.12.18' );
    2525
    2626require_once DEPAY_WC_ABSPATH . '/vendor/autoload.php';
  • depay-payments-for-woocommerce/tags/2.12.18/includes/class-depay-wc-payments-rest.php

    r3172075 r3205102  
    8282                'methods' => 'GET',
    8383                'callback' => [ $this, 'debug' ],
    84                 'permission_callback' => '__return_true'
     84                'permission_callback' => array( $this, 'must_be_signed_by_remote' )
    8585            ]
    8686        );
     
    635635    }
    636636
     637    public function must_be_signed_by_remote( $request ) {
     638        if ( !$request->get_param('challenge') || !$request->get_param('signature') ) {
     639            return false;
     640        } else {
     641            $key = PublicKeyLoader::load( self::$key )->withHash( 'sha256' )->withPadding( RSA::SIGNATURE_PSS )->withMGFHash( 'sha256' )->withSaltLength( 64 );
     642            $signature = $request->get_param('signature');
     643            $signature = str_replace( '_', '/', $signature );
     644            $signature = str_replace( '-', '+', $signature );
     645            return $key->verify( $request->get_param('challenge'), base64_decode( $signature ) );
     646        }
     647    }
     648   
    637649    public function must_be_wc_admin( $request ) {
    638650
  • depay-payments-for-woocommerce/tags/2.12.18/languages/depay-woocommerce-payments.pot

    r3204303 r3205102  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: DePay WooCommerce Payments 2.12.17\n"
     5"Project-Id-Version: DePay WooCommerce Payments 2.12.18\n"
    66"Report-Msgid-Bugs-To: "
    77"support@depay.com\n"
  • depay-payments-for-woocommerce/tags/2.12.18/package.json

    r3204303 r3205102  
    22  "name": "@depay/web3-woocommerce-depay-payments",
    33  "moduleName": "WooCommerceDePayPayments",
    4   "version": "2.12.17",
     4  "version": "2.12.18",
    55  "description": "Accept Web3 Crypto Payments. Supports various tokens, blockchains and wallets. MetaMask, Phantom, USDC, USDT, ETH, SOL, BSC, POL, xDAI…",
    66  "main": "./dist/umd/index.js",
  • depay-payments-for-woocommerce/tags/2.12.18/readme.txt

    r3204303 r3205102  
    55Tested up to: 6.7
    66Requires PHP: 7.2
    7 Stable tag: 2.12.17
     7Stable tag: 2.12.18
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8383== Changelog ==
    8484
     85= 2024-12-9 - v2.12.18 =
     86* improves debug endpoint
     87
    8588= 2024-12-8 - v2.12.17 =
    8689* fixes blockchain icons on checkout page (on Safari and iPhone)
  • depay-payments-for-woocommerce/trunk/depay-woocommerce-payments.php

    r3204303 r3205102  
    1212 * Requires at least: 5.8
    1313 * Requires PHP: 7.0
    14  * Version: 2.12.17
     14 * Version: 2.12.18
    1515 *
    1616 * @package DePay\Payments
     
    2222define( 'DEPAY_WC_ABSPATH', __DIR__ . '/' );
    2323define( 'DEPAY_MIN_WC_ADMIN_VERSION', '0.23.2' );
    24 define( 'DEPAY_CURRENT_VERSION', '2.12.17' );
     24define( 'DEPAY_CURRENT_VERSION', '2.12.18' );
    2525
    2626require_once DEPAY_WC_ABSPATH . '/vendor/autoload.php';
  • depay-payments-for-woocommerce/trunk/includes/class-depay-wc-payments-rest.php

    r3172075 r3205102  
    8282                'methods' => 'GET',
    8383                'callback' => [ $this, 'debug' ],
    84                 'permission_callback' => '__return_true'
     84                'permission_callback' => array( $this, 'must_be_signed_by_remote' )
    8585            ]
    8686        );
     
    635635    }
    636636
     637    public function must_be_signed_by_remote( $request ) {
     638        if ( !$request->get_param('challenge') || !$request->get_param('signature') ) {
     639            return false;
     640        } else {
     641            $key = PublicKeyLoader::load( self::$key )->withHash( 'sha256' )->withPadding( RSA::SIGNATURE_PSS )->withMGFHash( 'sha256' )->withSaltLength( 64 );
     642            $signature = $request->get_param('signature');
     643            $signature = str_replace( '_', '/', $signature );
     644            $signature = str_replace( '-', '+', $signature );
     645            return $key->verify( $request->get_param('challenge'), base64_decode( $signature ) );
     646        }
     647    }
     648   
    637649    public function must_be_wc_admin( $request ) {
    638650
  • depay-payments-for-woocommerce/trunk/languages/depay-woocommerce-payments.pot

    r3204303 r3205102  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: DePay WooCommerce Payments 2.12.17\n"
     5"Project-Id-Version: DePay WooCommerce Payments 2.12.18\n"
    66"Report-Msgid-Bugs-To: "
    77"support@depay.com\n"
  • depay-payments-for-woocommerce/trunk/package.json

    r3204303 r3205102  
    22  "name": "@depay/web3-woocommerce-depay-payments",
    33  "moduleName": "WooCommerceDePayPayments",
    4   "version": "2.12.17",
     4  "version": "2.12.18",
    55  "description": "Accept Web3 Crypto Payments. Supports various tokens, blockchains and wallets. MetaMask, Phantom, USDC, USDT, ETH, SOL, BSC, POL, xDAI…",
    66  "main": "./dist/umd/index.js",
  • depay-payments-for-woocommerce/trunk/readme.txt

    r3204303 r3205102  
    55Tested up to: 6.7
    66Requires PHP: 7.2
    7 Stable tag: 2.12.17
     7Stable tag: 2.12.18
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8383== Changelog ==
    8484
     85= 2024-12-9 - v2.12.18 =
     86* improves debug endpoint
     87
    8588= 2024-12-8 - v2.12.17 =
    8689* fixes blockchain icons on checkout page (on Safari and iPhone)
Note: See TracChangeset for help on using the changeset viewer.