Changeset 3438297
- Timestamp:
- 01/13/2026 04:08:06 AM (5 weeks ago)
- Location:
- cloudsecure-wp-security/trunk
- Files:
-
- 3 edited
-
cloudsecure-wp.php (modified) (1 diff)
-
modules/admin/two-factor-authentication-registration.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cloudsecure-wp-security/trunk/cloudsecure-wp.php
r3422588 r3438297 14 14 * Plugin URI: https://wpplugin.cloudsecure.ne.jp/cloudsecure_wp_security 15 15 * Description: 管理画面とログインURLをサイバー攻撃から守る、安心の国産・日本語対応プラグインです。かんたんな設定を行うだけで、不正アクセスや不正ログインからあなたのWordPressを保護し、セキュリティが向上します。また、各機能の有効・無効(ON・OFF)や設定などをお好みにカスタマイズし、いつでも保護状態を管理できます。 16 * Version: 1.3.2 216 * Version: 1.3.23 17 17 * Requires PHP: 7.1 18 18 * Author: CloudSecure,Inc. -
cloudsecure-wp-security/trunk/modules/admin/two-factor-authentication-registration.php
r3101467 r3438297 13 13 */ 14 14 private $default_key; 15 /** 16 * 秘密鍵が登録済みかどうか 17 * 18 * @var bool 19 */ 20 private $is_registered; 15 21 16 22 function __construct( array $info, CloudSecureWP_Two_Factor_Authentication $two_factor_authentication ) { … … 25 31 */ 26 32 public function prepare_view_data(): void { 27 $this->default_key = get_user_option( 'cloudsecurewp_two_factor_authentication_secret' ); 33 $stored_secret = get_user_option( 'cloudsecurewp_two_factor_authentication_secret' ); 34 $this->is_registered = ! empty( $stored_secret ); 35 $this->default_key = ''; 28 36 if ( ! empty( $_POST ) && check_admin_referer( $this->two_factor_authentication->get_feature_key() . '_csrf' ) ) { 29 37 if ( ! empty( $_POST['key'] ) ) { … … 45 53 update_user_option( get_current_user_id(), 'cloudsecurewp_two_factor_authentication_secret', $key ); 46 54 $this->messages[] = 'セットアップキーを保存しました。'; 55 // 保存後は秘密鍵を非表示にする 56 $this->default_key = ''; 57 $this->is_registered = true; 47 58 } else { 48 59 $this->errors[] = 'セットアップキーを保存できませんでした。<br />認証コードが間違っています。'; … … 77 88 <div class="box"> 78 89 <div class="box-bottom"> 90 <div class="box-row flex-start"> 91 <div class="box-row-title not-label pt-12"> 92 <label for="key">設定状況</label> 93 </div> 94 <div class="box-row-content"> 95 <div class="flex"> 96 <?php if ( $this->is_registered ) : ?> 97 <p>設定済</p> 98 <?php else : ?> 99 <p>未設定</p> 100 <?php endif; ?> 101 </div> 102 </div> 103 </div> 79 104 <div class="box-row flex-start"> 80 105 <div class="box-row-title not-label pt-12"> … … 172 197 const qrcode = new QRCode('qrcode', {correctLevel: QRCode.CorrectLevel.M}) 173 198 174 function showQRIfExists() { 175 const key = document.getElementById('key').value 176 document.getElementById('qrcode_container').hidden = !key 177 document.getElementById('guide_message').hidden = !key 178 if (!key) return 199 function showQRCode(key) { 200 document.getElementById('qrcode_container').hidden = false 201 document.getElementById('guide_message').hidden = false 179 202 const name = document.querySelector('.display-name').textContent 180 203 … … 185 208 } 186 209 187 showQRIfExists() 210 // ページ読み込み時に秘密鍵が入力されている場合はQRコードを表示 211 // (認証コードエラー時の再表示のため) 212 const secretKey = document.getElementById('key').value 213 if (secretKey) { 214 showQRCode(secretKey) 215 } 188 216 189 217 document.getElementById('generate_key').addEventListener('click', () => { 190 document.getElementById('key').value = generateKey() 191 showQRIfExists() 218 const newKey = generateKey() 219 document.getElementById('key').value = newKey 220 showQRCode(newKey) 192 221 }) 193 222 </script> -
cloudsecure-wp-security/trunk/readme.txt
r3422588 r3438297 4 4 Requires at least: 5.3.15 5 5 Tested up to: 6.9 6 Stable tag: 1.3.2 26 Stable tag: 1.3.23 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.23 = 110 * 軽微な修正 111 109 112 = 1.3.22 = 110 113 * 2段階認証に関する軽微な修正
Note: See TracChangeset
for help on using the changeset viewer.