Changeset 2708883
- Timestamp:
- 04/13/2022 03:14:33 AM (4 years ago)
- Location:
- web3-wallet-login
- Files:
-
- 4 edited
- 13 copied
-
tags/1.1.0 (copied) (copied from web3-wallet-login/trunk)
-
tags/1.1.0/admin (copied) (copied from web3-wallet-login/trunk/admin)
-
tags/1.1.0/composer.json (copied) (copied from web3-wallet-login/trunk/composer.json)
-
tags/1.1.0/composer.lock (copied) (copied from web3-wallet-login/trunk/composer.lock)
-
tags/1.1.0/includes (copied) (copied from web3-wallet-login/trunk/includes)
-
tags/1.1.0/index.php (copied) (copied from web3-wallet-login/trunk/index.php)
-
tags/1.1.0/languages (copied) (copied from web3-wallet-login/trunk/languages)
-
tags/1.1.0/license.txt (copied) (copied from web3-wallet-login/trunk/license.txt)
-
tags/1.1.0/public (copied) (copied from web3-wallet-login/trunk/public)
-
tags/1.1.0/public/js/web3-wallet-login-library.js (modified) (1 diff)
-
tags/1.1.0/readme.txt (copied) (copied from web3-wallet-login/trunk/readme.txt) (1 diff)
-
tags/1.1.0/uninstall.php (copied) (copied from web3-wallet-login/trunk/uninstall.php)
-
tags/1.1.0/vendor (copied) (copied from web3-wallet-login/trunk/vendor)
-
tags/1.1.0/web3-wallet-login.php (copied) (copied from web3-wallet-login/trunk/web3-wallet-login.php) (4 diffs)
-
trunk/public/js/web3-wallet-login-library.js (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/web3-wallet-login.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
web3-wallet-login/tags/1.1.0/public/js/web3-wallet-login-library.js
r2708845 r2708883 106 106 var finalize_login = function() { 107 107 $.ajax({ 108 url: "/wp-admin/admin-ajax.php",108 url: loginvars.actionurl, 109 109 type: 'POST', 110 110 "data": { 111 111 "action": 'WEB3_WALLET_LOGIN_authenticate', 112 "_ajax_nonce": loginvars.nonce, 112 113 "address": globalAccount, 113 " nonce": nonce,114 "signonce": nonce, 114 115 "sig": globalSignature 115 116 }, -
web3-wallet-login/tags/1.1.0/readme.txt
r2708848 r2708883 4 4 Requires at least: 4.7 5 5 Tested up to: 5.9 6 Stable tag: 1. 0.06 Stable tag: 1.1.0 7 7 Requires PHP: 7.3 8 8 License: GPLv2 or later -
web3-wallet-login/tags/1.1.0/web3-wallet-login.php
r2708845 r2708883 5 5 * Plugin Name: Web3 Wallet Login 6 6 * Description: Allow users to login via their web3 wallet address. 7 * Version: 1. 0.07 * Version: 1.1.0 8 8 * Author: iPal Media Inc. 9 9 * Author URI: https://ipalmedia.com … … 39 39 * @var string $version The plugin version number. 40 40 */ 41 public $version = '1. 0.0';41 public $version = '1.1.0'; 42 42 43 43 /** … … 156 156 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 ); 157 157 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'),] ); 159 159 }); 160 160 … … 192 192 // Check correct variables were sent; 193 193 $address = sanitize_text_field($_POST['address']) ?? ''; 194 $nonce = sanitize_text_field($_POST[' nonce']) ?? '';194 $nonce = sanitize_text_field($_POST['signonce']) ?? ''; 195 195 $sig = sanitize_text_field($_POST['sig']) ?? ''; 196 196 197 197 if (empty($address) || empty($nonce) || empty($sig)) { 198 198 self::respondWithError('Some parameters missing.' ); 199 wp_die(); 200 } 199 } 200 201 check_ajax_referer('web3_wallet_login_nonce'); 201 202 202 203 // Load dependencies needed to check signature. -
web3-wallet-login/trunk/public/js/web3-wallet-login-library.js
r2708845 r2708883 106 106 var finalize_login = function() { 107 107 $.ajax({ 108 url: "/wp-admin/admin-ajax.php",108 url: loginvars.actionurl, 109 109 type: 'POST', 110 110 "data": { 111 111 "action": 'WEB3_WALLET_LOGIN_authenticate', 112 "_ajax_nonce": loginvars.nonce, 112 113 "address": globalAccount, 113 " nonce": nonce,114 "signonce": nonce, 114 115 "sig": globalSignature 115 116 }, -
web3-wallet-login/trunk/readme.txt
r2708848 r2708883 4 4 Requires at least: 4.7 5 5 Tested up to: 5.9 6 Stable tag: 1. 0.06 Stable tag: 1.1.0 7 7 Requires PHP: 7.3 8 8 License: GPLv2 or later -
web3-wallet-login/trunk/web3-wallet-login.php
r2708845 r2708883 5 5 * Plugin Name: Web3 Wallet Login 6 6 * Description: Allow users to login via their web3 wallet address. 7 * Version: 1. 0.07 * Version: 1.1.0 8 8 * Author: iPal Media Inc. 9 9 * Author URI: https://ipalmedia.com … … 39 39 * @var string $version The plugin version number. 40 40 */ 41 public $version = '1. 0.0';41 public $version = '1.1.0'; 42 42 43 43 /** … … 156 156 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 ); 157 157 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'),] ); 159 159 }); 160 160 … … 192 192 // Check correct variables were sent; 193 193 $address = sanitize_text_field($_POST['address']) ?? ''; 194 $nonce = sanitize_text_field($_POST[' nonce']) ?? '';194 $nonce = sanitize_text_field($_POST['signonce']) ?? ''; 195 195 $sig = sanitize_text_field($_POST['sig']) ?? ''; 196 196 197 197 if (empty($address) || empty($nonce) || empty($sig)) { 198 198 self::respondWithError('Some parameters missing.' ); 199 wp_die(); 200 } 199 } 200 201 check_ajax_referer('web3_wallet_login_nonce'); 201 202 202 203 // Load dependencies needed to check signature.
Note: See TracChangeset
for help on using the changeset viewer.