Changeset 3452630
- Timestamp:
- 02/03/2026 07:33:19 AM (5 weeks ago)
- Location:
- basecloud-shield
- Files:
-
- 8 edited
- 1 copied
-
tags/1.2.8 (copied) (copied from basecloud-shield/trunk)
-
tags/1.2.8/CHANGELOG.md (modified) (1 diff)
-
tags/1.2.8/basecloud-shield.php (modified) (4 diffs)
-
tags/1.2.8/package.json (modified) (1 diff)
-
tags/1.2.8/readme.txt (modified) (2 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/basecloud-shield.php (modified) (4 diffs)
-
trunk/package.json (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
basecloud-shield/tags/1.2.8/CHANGELOG.md
r3452601 r3452630 2 2 3 3 All notable changes to BaseCloud Shield will be documented in this file. 4 5 ## [1.2.8] - 2026-02-03 6 7 ### 🔥 Critical Hotfix 8 - **FIXED**: "Suspicious session detected" error blocking legitimate logins 9 - **FIXED**: Session token validation now works correctly 10 - Session token generation now uses consistent secret instead of time-based 11 - Users can successfully complete login flow without false security alerts 12 13 ### ✨ Improvements 14 - Enhanced OTP lock mechanism to prevent unnecessary duplicate OTP generation 15 - Existing valid OTP is reused if user attempts login multiple times 16 - Better handling of page refreshes during OTP verification process 17 - Reduced false positive security alerts for legitimate users 18 19 ### 🐛 Bug Fixes 20 - Session token mismatch that was flagging all logins as suspicious 21 - OTP lock mechanism now properly redirects to verification page 4 22 5 23 ## [1.2.7] - 2026-02-03 -
basecloud-shield/tags/1.2.8/basecloud-shield.php
r3452601 r3452630 3 3 * Plugin Name: BaseCloud Shield 4 4 * Description: Enterprise-grade 2FA security. Supports Central Manager Notifications, WP Email, SendGrid, WhatsApp, SMS, and Webhooks. 5 * Version: 1.2. 75 * Version: 1.2.8 6 6 * Author: BaseCloud Team 7 7 * Author URI: https://www.basecloudglobal.com/ … … 15 15 if (!defined('ABSPATH')) { exit; } 16 16 17 define('BCSHIELD_VERSION', '1.2. 7');17 define('BCSHIELD_VERSION', '1.2.8'); 18 18 define('BCSHIELD_MAX_ATTEMPTS', 5); 19 19 define('BCSHIELD_LOCKOUT_DURATION', 900); … … 142 142 // Prevent duplicate OTP generation (lock mechanism) 143 143 $lock_key = 'bcshield_otp_lock_' . $user->ID; 144 if (get_transient($lock_key)) { 145 // OTP already generated recently, skip duplicate 146 return $user; 144 $existing_otp = get_transient('bcshield_otp_' . $user->ID); 145 146 // If OTP already exists and is valid, redirect to verification page without generating new OTP 147 if ($existing_otp && get_transient($lock_key)) { 148 $session_token = $this->generate_session_token($user->ID, $client_ip, $user_agent); 149 setcookie('bcshield_pending_user', $user->ID, time() + ($opts['otp_validity'] ?? 10) * 60, '/', '', true, true); 150 setcookie('bcshield_session', $session_token, time() + ($opts['otp_validity'] ?? 10) * 60, '/', '', true, true); 151 152 $base_url = site_url(); 153 $redirect = add_query_arg('bcshield_action', 'verify_otp', $base_url); 154 wp_redirect($redirect); 155 exit; 147 156 } 148 157 … … 301 310 302 311 private function generate_session_token($user_id, $ip, $user_agent) { 303 $secret = wp_salt('nonce') . time(); 312 // Use a consistent secret (not time-based) so token remains valid during OTP entry 313 $secret = wp_salt('nonce') . BCSHIELD_VERSION; 304 314 return hash_hmac('sha256', $user_id . $ip . $user_agent, $secret); 305 315 } -
basecloud-shield/tags/1.2.8/package.json
r3452601 r3452630 1 1 { 2 2 "name": "basecloud-shield", 3 "version": "1.2. 7",3 "version": "1.2.8", 4 4 "description": "WordPress 2FA Security Plugin - Build and deployment scripts", 5 5 "scripts": { -
basecloud-shield/tags/1.2.8/readme.txt
r3452601 r3452630 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 1.2. 76 Stable tag: 1.2.8 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 118 118 119 119 == Changelog == 120 121 = 1.2.8 = 122 **Critical Hotfix - Login Issue Resolved** 123 124 **CRITICAL FIX:** 125 • Fixed "Suspicious session detected" blocking legitimate logins 126 • Session token now uses consistent secret (not time-based) 127 • Users can now successfully complete login with OTP 128 129 **Improvements:** 130 • Enhanced OTP lock mechanism to prevent duplicate generation 131 • Existing valid OTP reused if login attempted multiple times 132 • Better handling of page refreshes during OTP verification 133 • Reduced false positive security alerts 120 134 121 135 = 1.2.7 = -
basecloud-shield/trunk/CHANGELOG.md
r3452601 r3452630 2 2 3 3 All notable changes to BaseCloud Shield will be documented in this file. 4 5 ## [1.2.8] - 2026-02-03 6 7 ### 🔥 Critical Hotfix 8 - **FIXED**: "Suspicious session detected" error blocking legitimate logins 9 - **FIXED**: Session token validation now works correctly 10 - Session token generation now uses consistent secret instead of time-based 11 - Users can successfully complete login flow without false security alerts 12 13 ### ✨ Improvements 14 - Enhanced OTP lock mechanism to prevent unnecessary duplicate OTP generation 15 - Existing valid OTP is reused if user attempts login multiple times 16 - Better handling of page refreshes during OTP verification process 17 - Reduced false positive security alerts for legitimate users 18 19 ### 🐛 Bug Fixes 20 - Session token mismatch that was flagging all logins as suspicious 21 - OTP lock mechanism now properly redirects to verification page 4 22 5 23 ## [1.2.7] - 2026-02-03 -
basecloud-shield/trunk/basecloud-shield.php
r3452601 r3452630 3 3 * Plugin Name: BaseCloud Shield 4 4 * Description: Enterprise-grade 2FA security. Supports Central Manager Notifications, WP Email, SendGrid, WhatsApp, SMS, and Webhooks. 5 * Version: 1.2. 75 * Version: 1.2.8 6 6 * Author: BaseCloud Team 7 7 * Author URI: https://www.basecloudglobal.com/ … … 15 15 if (!defined('ABSPATH')) { exit; } 16 16 17 define('BCSHIELD_VERSION', '1.2. 7');17 define('BCSHIELD_VERSION', '1.2.8'); 18 18 define('BCSHIELD_MAX_ATTEMPTS', 5); 19 19 define('BCSHIELD_LOCKOUT_DURATION', 900); … … 142 142 // Prevent duplicate OTP generation (lock mechanism) 143 143 $lock_key = 'bcshield_otp_lock_' . $user->ID; 144 if (get_transient($lock_key)) { 145 // OTP already generated recently, skip duplicate 146 return $user; 144 $existing_otp = get_transient('bcshield_otp_' . $user->ID); 145 146 // If OTP already exists and is valid, redirect to verification page without generating new OTP 147 if ($existing_otp && get_transient($lock_key)) { 148 $session_token = $this->generate_session_token($user->ID, $client_ip, $user_agent); 149 setcookie('bcshield_pending_user', $user->ID, time() + ($opts['otp_validity'] ?? 10) * 60, '/', '', true, true); 150 setcookie('bcshield_session', $session_token, time() + ($opts['otp_validity'] ?? 10) * 60, '/', '', true, true); 151 152 $base_url = site_url(); 153 $redirect = add_query_arg('bcshield_action', 'verify_otp', $base_url); 154 wp_redirect($redirect); 155 exit; 147 156 } 148 157 … … 301 310 302 311 private function generate_session_token($user_id, $ip, $user_agent) { 303 $secret = wp_salt('nonce') . time(); 312 // Use a consistent secret (not time-based) so token remains valid during OTP entry 313 $secret = wp_salt('nonce') . BCSHIELD_VERSION; 304 314 return hash_hmac('sha256', $user_id . $ip . $user_agent, $secret); 305 315 } -
basecloud-shield/trunk/package.json
r3452601 r3452630 1 1 { 2 2 "name": "basecloud-shield", 3 "version": "1.2. 7",3 "version": "1.2.8", 4 4 "description": "WordPress 2FA Security Plugin - Build and deployment scripts", 5 5 "scripts": { -
basecloud-shield/trunk/readme.txt
r3452601 r3452630 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 1.2. 76 Stable tag: 1.2.8 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 118 118 119 119 == Changelog == 120 121 = 1.2.8 = 122 **Critical Hotfix - Login Issue Resolved** 123 124 **CRITICAL FIX:** 125 • Fixed "Suspicious session detected" blocking legitimate logins 126 • Session token now uses consistent secret (not time-based) 127 • Users can now successfully complete login with OTP 128 129 **Improvements:** 130 • Enhanced OTP lock mechanism to prevent duplicate generation 131 • Existing valid OTP reused if login attempted multiple times 132 • Better handling of page refreshes during OTP verification 133 • Reduced false positive security alerts 120 134 121 135 = 1.2.7 =
Note: See TracChangeset
for help on using the changeset viewer.