Changeset 3341484
- Timestamp:
- 08/08/2025 09:16:25 AM (8 months ago)
- Location:
- cloudsecure-wp-security/trunk
- Files:
-
- 4 edited
-
cloudsecure-wp.php (modified) (1 diff)
-
modules/cloudsecure-wp.php (modified) (1 diff)
-
modules/two-factor-authentication.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cloudsecure-wp-security/trunk/cloudsecure-wp.php
r3332733 r3341484 14 14 * Plugin URI: https://wpplugin.cloudsecure.ne.jp/cloudsecure_wp_security 15 15 * Description: 管理画面とログインURLをサイバー攻撃から守る、安心の国産・日本語対応プラグインです。かんたんな設定を行うだけで、不正アクセスや不正ログインからあなたのWordPressを保護し、セキュリティが向上します。また、各機能の有効・無効(ON・OFF)や設定などをお好みにカスタマイズし、いつでも保護状態を管理できます。 16 * Version: 1.3.1 616 * Version: 1.3.17 17 17 * Requires PHP: 7.1 18 18 * Author: CloudSecure,Inc. -
cloudsecure-wp-security/trunk/modules/cloudsecure-wp.php
r3317930 r3341484 258 258 259 259 if ( $this->two_factor_authentication->is_enabled() && 'xmlrpc.php' !== basename( $_SERVER['SCRIPT_NAME'] ) && ! is_admin() ) { 260 add_filter( 'authenticate', array( $this->two_factor_authentication, 'decode_base64_credentials' ), 0, 3 ); 260 261 add_action( 'wp_login', array( $this->two_factor_authentication, 'wp_login' ), 0, 2 ); 261 262 add_action( 'wp_login', array( $this->two_factor_authentication, 'redirect_if_not_two_factor_authentication_registered' ), 10, 2 ); -
cloudsecure-wp-security/trunk/modules/two-factor-authentication.php
r3304559 r3341484 14 14 */ 15 15 private $disable_login; 16 17 /** 18 * 元の認証情報を保存(Base64デコード済み) 19 */ 20 private $original_credentials = array(); 16 21 17 22 function __construct( array $info, CloudSecureWP_Config $config, CloudSecureWP_Disable_Login $disable_login ) { … … 150 155 if ( ! $secret ) { 151 156 return; 157 } 158 159 // 初回ログイン時に元の認証情報を保存 160 if ( empty( $this->original_credentials ) ) { 161 $this->original_credentials['log'] = $user_login; 162 $this->original_credentials['pwd'] = $_POST['pwd'] ?? ''; 152 163 } 153 164 … … 196 207 <form name="loginform" id="loginform" 197 208 action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post"> 198 <input type="hidden" name="log" value="<?php echo esc_attr( sanitize_text_field( $_REQUEST['log'] )); ?>"/>199 <input type="hidden" name="pwd" value="<?php echo esc_attr( sanitize_text_field( $_REQUEST['pwd'] )); ?>"/>209 <input type="hidden" name="log" value="<?php echo base64_encode( $this->original_credentials['log'] ?? $_REQUEST['log'] ?? '' ); ?>"/> 210 <input type="hidden" name="pwd" value="<?php echo base64_encode( $this->original_credentials['pwd'] ?? $_REQUEST['pwd'] ?? '' ); ?>"/> 200 211 <?php if ( array_key_exists( 'cloudsecurewp_captcha', $_REQUEST ) ) : ?> 201 212 <input type="hidden" name="cloudsecurewp_captcha" … … 276 287 return $value; 277 288 } 289 290 /** 291 * 2段階認証フォームからのBase64エンコードされた認証情報をデコード 292 * 293 * @param mixed $user 294 * @param string $username 295 * @param string $password 296 * @return mixed 297 */ 298 public function decode_base64_credentials( $user, $username, $password ) { 299 // 2段階認証フォームからの送信かチェック 300 if ( ! empty( $_POST['google_authenticator_code'] ) && check_admin_referer( $this->get_feature_key() . '_csrf' ) ) { 301 // Base64エンコードされた認証情報をデコード 302 if ( isset( $_POST['log'] ) ) { 303 $decoded_username = base64_decode( $_POST['log'] ); 304 $this->original_credentials['log'] = $decoded_username; 305 $_POST['log'] = $decoded_username; 306 } 307 308 if ( isset( $_POST['pwd'] ) ) { 309 $decoded_password = base64_decode( $_POST['pwd'] ); 310 $this->original_credentials['pwd'] = $decoded_password; 311 $_POST['pwd'] = $decoded_password; 312 313 // デコードされたパスワードで認証を実行 314 return wp_authenticate_username_password( null, $decoded_username, $decoded_password ); 315 } 316 } 317 318 return $user; 319 } 278 320 } -
cloudsecure-wp-security/trunk/readme.txt
r3332733 r3341484 4 4 Requires at least: 5.3.15 5 5 Tested up to: 6.8 6 Stable tag: 1.3.1 66 Stable tag: 1.3.17 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 107 107 == Changelog == 108 108 109 = 1.3.17 = 110 * 2段階認証機能に関する不具合を修正 111 109 112 = 1.3.16 = 110 113 * 軽微な修正
Note: See TracChangeset
for help on using the changeset viewer.