Plugin Directory

Changeset 2708883


Ignore:
Timestamp:
04/13/2022 03:14:33 AM (4 years ago)
Author:
vpallegar
Message:

tagging version 1.1.0

Location:
web3-wallet-login
Files:
4 edited
13 copied

Legend:

Unmodified
Added
Removed
  • web3-wallet-login/tags/1.1.0/public/js/web3-wallet-login-library.js

    r2708845 r2708883  
    106106    var finalize_login = function() {
    107107        $.ajax({
    108             url: "/wp-admin/admin-ajax.php",
     108            url: loginvars.actionurl,
    109109            type: 'POST',
    110110            "data": {
    111111                "action": 'WEB3_WALLET_LOGIN_authenticate',
     112                "_ajax_nonce": loginvars.nonce,
    112113                "address": globalAccount,
    113                 "nonce": nonce,
     114                "signonce": nonce,
    114115                "sig": globalSignature
    115116            },
  • web3-wallet-login/tags/1.1.0/readme.txt

    r2708848 r2708883  
    44Requires at least: 4.7
    55Tested up to: 5.9
    6 Stable tag: 1.0.0
     6Stable tag: 1.1.0
    77Requires PHP: 7.3
    88License: GPLv2 or later
  • web3-wallet-login/tags/1.1.0/web3-wallet-login.php

    r2708845 r2708883  
    55 * Plugin Name: Web3 Wallet Login
    66 * Description: Allow users to login via their web3 wallet address.
    7  * Version:     1.0.0
     7 * Version:     1.1.0
    88 * Author:      iPal Media Inc.
    99 * Author URI:  https://ipalmedia.com
     
    3939         * @var  string $version The plugin version number.
    4040         */
    41         public $version = '1.0.0';
     41        public $version = '1.1.0';
    4242
    4343        /**
     
    156156                    wp_register_script( 'web3-wallet-login-plugin-scripts', WEB3LBS_URL . 'public/js/web3-wallet-login-library.js', array( 'jquery' ), filemtime( WEB3LBS_PATH . 'public/js/web3-wallet-login-library.js' ), true );
    157157                    wp_enqueue_script( 'web3-wallet-login-plugin-scripts' );
    158                     wp_localize_script( 'web3-wallet-login-plugin-scripts', 'loginvars', ['site' => site_url()] );
     158                    wp_localize_script( 'web3-wallet-login-plugin-scripts', 'loginvars', ['site' => site_url(), 'nonce' => wp_create_nonce('web3_wallet_login_nonce'), 'actionurl' => admin_url('admin-ajax.php'),] );
    159159                });
    160160
     
    192192            // Check correct variables were sent;
    193193            $address = sanitize_text_field($_POST['address']) ?? '';
    194             $nonce = sanitize_text_field($_POST['nonce']) ?? '';
     194            $nonce = sanitize_text_field($_POST['signonce']) ?? '';
    195195            $sig = sanitize_text_field($_POST['sig']) ?? '';
    196196
    197197            if (empty($address)  || empty($nonce) || empty($sig)) {
    198198                self::respondWithError('Some parameters missing.' );
    199                 wp_die();
    200             }
     199            }
     200
     201            check_ajax_referer('web3_wallet_login_nonce');
    201202
    202203            // Load dependencies needed to check signature.
  • web3-wallet-login/trunk/public/js/web3-wallet-login-library.js

    r2708845 r2708883  
    106106    var finalize_login = function() {
    107107        $.ajax({
    108             url: "/wp-admin/admin-ajax.php",
     108            url: loginvars.actionurl,
    109109            type: 'POST',
    110110            "data": {
    111111                "action": 'WEB3_WALLET_LOGIN_authenticate',
     112                "_ajax_nonce": loginvars.nonce,
    112113                "address": globalAccount,
    113                 "nonce": nonce,
     114                "signonce": nonce,
    114115                "sig": globalSignature
    115116            },
  • web3-wallet-login/trunk/readme.txt

    r2708848 r2708883  
    44Requires at least: 4.7
    55Tested up to: 5.9
    6 Stable tag: 1.0.0
     6Stable tag: 1.1.0
    77Requires PHP: 7.3
    88License: GPLv2 or later
  • web3-wallet-login/trunk/web3-wallet-login.php

    r2708845 r2708883  
    55 * Plugin Name: Web3 Wallet Login
    66 * Description: Allow users to login via their web3 wallet address.
    7  * Version:     1.0.0
     7 * Version:     1.1.0
    88 * Author:      iPal Media Inc.
    99 * Author URI:  https://ipalmedia.com
     
    3939         * @var  string $version The plugin version number.
    4040         */
    41         public $version = '1.0.0';
     41        public $version = '1.1.0';
    4242
    4343        /**
     
    156156                    wp_register_script( 'web3-wallet-login-plugin-scripts', WEB3LBS_URL . 'public/js/web3-wallet-login-library.js', array( 'jquery' ), filemtime( WEB3LBS_PATH . 'public/js/web3-wallet-login-library.js' ), true );
    157157                    wp_enqueue_script( 'web3-wallet-login-plugin-scripts' );
    158                     wp_localize_script( 'web3-wallet-login-plugin-scripts', 'loginvars', ['site' => site_url()] );
     158                    wp_localize_script( 'web3-wallet-login-plugin-scripts', 'loginvars', ['site' => site_url(), 'nonce' => wp_create_nonce('web3_wallet_login_nonce'), 'actionurl' => admin_url('admin-ajax.php'),] );
    159159                });
    160160
     
    192192            // Check correct variables were sent;
    193193            $address = sanitize_text_field($_POST['address']) ?? '';
    194             $nonce = sanitize_text_field($_POST['nonce']) ?? '';
     194            $nonce = sanitize_text_field($_POST['signonce']) ?? '';
    195195            $sig = sanitize_text_field($_POST['sig']) ?? '';
    196196
    197197            if (empty($address)  || empty($nonce) || empty($sig)) {
    198198                self::respondWithError('Some parameters missing.' );
    199                 wp_die();
    200             }
     199            }
     200
     201            check_ajax_referer('web3_wallet_login_nonce');
    201202
    202203            // Load dependencies needed to check signature.
Note: See TracChangeset for help on using the changeset viewer.