Plugin Directory

Changeset 3212409


Ignore:
Timestamp:
12/24/2024 05:02:20 AM (15 months ago)
Author:
Ecwid
Message:

Update to version 6.12.24 from GitHub

Location:
ecwid-shopping-cart
Files:
8 deleted
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ecwid-shopping-cart/tags/6.12.24/ecwid-shopping-cart.php

    r3202954 r3212409  
    29072907        $user_data_encoded = base64_encode(json_encode($user_data));
    29082908        $time = time();
    2909         $hmac = ecwid_hmacsha1("$user_data_encoded $time", $key);
     2909        $hmac = hash_hmac('sha256', "$user_data_encoded $time", $key);
    29102910
    29112911        $ecwid_sso_profile = "$user_data_encoded $hmac $time";
     
    29442944
    29452945    return $ecwid_sso_script;
    2946 }
    2947 
    2948 // from: http://www.php.net/manual/en/function.sha1.php#39492
    2949 function ecwid_hmacsha1($data, $key) {
    2950   if (function_exists("hash_hmac")) {
    2951     return hash_hmac('sha1', $data, $key);
    2952   } else {
    2953     $blocksize=64;
    2954     $hashfunc='sha1';
    2955     if (strlen($key)>$blocksize)
    2956         $key=pack('H*', $hashfunc($key));
    2957     $key=str_pad($key,$blocksize,chr(0x00));
    2958     $ipad=str_repeat(chr(0x36),$blocksize);
    2959     $opad=str_repeat(chr(0x5c),$blocksize);
    2960     $hmac = pack(
    2961                 'H*',$hashfunc(
    2962                     ($key^$opad).pack(
    2963                         'H*',$hashfunc(
    2964                             ($key^$ipad).$data
    2965                         )
    2966                     )
    2967                 )
    2968             );
    2969     return bin2hex($hmac);
    2970     }
    29712946}
    29722947
  • ecwid-shopping-cart/tags/6.12.24/lib/ecwid_api_v3.php

    r3202954 r3212409  
    828828
    829829        $request_params = array(
    830             'appClientId',
    831             'appSecretKey',
    832830            'returnApiToken' => 'true',
    833831        );
     
    841839                'headers' => array(
    842840                    'Content-Type' => 'application/json;charset="utf-8"',
     841                    'X-Ecwid-App-Client-Id' => Ecwid_Config::get_oauth_appid(),
     842                    'X-Ecwid-App-Secret-Key' => Ecwid_Config::get_oauth_appsecret()
    843843                ),
    844844            )
  • ecwid-shopping-cart/tags/6.12.24/readme.txt

    r3202954 r3212409  
    66Requires at least: 4.4
    77Tested up to: 6.7
    8 Stable tag: 6.12.23
     8Stable tag: 6.12.24
    99
    1010Powerful, easy to use ecommerce shopping cart for WordPress. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
     
    154154
    155155== Changelog ==
     156= 6.12.24 - Dec 23, 2024 =
     157- Plugin code improvements for better security and stability.
     158
    156159= 6.12.23 - Dec 5, 2024 =
    157160- Fixed a PHP error message ("Deprecated: Use of "self" in callables is deprecated") for PHP versions since 8.2.
  • ecwid-shopping-cart/trunk/ecwid-shopping-cart.php

    r3202954 r3212409  
    29072907        $user_data_encoded = base64_encode(json_encode($user_data));
    29082908        $time = time();
    2909         $hmac = ecwid_hmacsha1("$user_data_encoded $time", $key);
     2909        $hmac = hash_hmac('sha256', "$user_data_encoded $time", $key);
    29102910
    29112911        $ecwid_sso_profile = "$user_data_encoded $hmac $time";
     
    29442944
    29452945    return $ecwid_sso_script;
    2946 }
    2947 
    2948 // from: http://www.php.net/manual/en/function.sha1.php#39492
    2949 function ecwid_hmacsha1($data, $key) {
    2950   if (function_exists("hash_hmac")) {
    2951     return hash_hmac('sha1', $data, $key);
    2952   } else {
    2953     $blocksize=64;
    2954     $hashfunc='sha1';
    2955     if (strlen($key)>$blocksize)
    2956         $key=pack('H*', $hashfunc($key));
    2957     $key=str_pad($key,$blocksize,chr(0x00));
    2958     $ipad=str_repeat(chr(0x36),$blocksize);
    2959     $opad=str_repeat(chr(0x5c),$blocksize);
    2960     $hmac = pack(
    2961                 'H*',$hashfunc(
    2962                     ($key^$opad).pack(
    2963                         'H*',$hashfunc(
    2964                             ($key^$ipad).$data
    2965                         )
    2966                     )
    2967                 )
    2968             );
    2969     return bin2hex($hmac);
    2970     }
    29712946}
    29722947
  • ecwid-shopping-cart/trunk/lib/ecwid_api_v3.php

    r3202954 r3212409  
    828828
    829829        $request_params = array(
    830             'appClientId',
    831             'appSecretKey',
    832830            'returnApiToken' => 'true',
    833831        );
     
    841839                'headers' => array(
    842840                    'Content-Type' => 'application/json;charset="utf-8"',
     841                    'X-Ecwid-App-Client-Id' => Ecwid_Config::get_oauth_appid(),
     842                    'X-Ecwid-App-Secret-Key' => Ecwid_Config::get_oauth_appsecret()
    843843                ),
    844844            )
  • ecwid-shopping-cart/trunk/readme.txt

    r3202954 r3212409  
    66Requires at least: 4.4
    77Tested up to: 6.7
    8 Stable tag: 6.12.23
     8Stable tag: 6.12.24
    99
    1010Powerful, easy to use ecommerce shopping cart for WordPress. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
     
    154154
    155155== Changelog ==
     156= 6.12.24 - Dec 23, 2024 =
     157- Plugin code improvements for better security and stability.
     158
    156159= 6.12.23 - Dec 5, 2024 =
    157160- Fixed a PHP error message ("Deprecated: Use of "self" in callables is deprecated") for PHP versions since 8.2.
Note: See TracChangeset for help on using the changeset viewer.