Plugin Directory

Changeset 3438297


Ignore:
Timestamp:
01/13/2026 04:08:06 AM (5 weeks ago)
Author:
cloudsecure
Message:

軽微な修正

Location:
cloudsecure-wp-security/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cloudsecure-wp-security/trunk/cloudsecure-wp.php

    r3422588 r3438297  
    1414 * Plugin URI:    https://wpplugin.cloudsecure.ne.jp/cloudsecure_wp_security
    1515 * Description:   管理画面とログインURLをサイバー攻撃から守る、安心の国産・日本語対応プラグインです。かんたんな設定を行うだけで、不正アクセスや不正ログインからあなたのWordPressを保護し、セキュリティが向上します。また、各機能の有効・無効(ON・OFF)や設定などをお好みにカスタマイズし、いつでも保護状態を管理できます。
    16  * Version:       1.3.22
     16 * Version:       1.3.23
    1717 * Requires PHP:  7.1
    1818 * Author:        CloudSecure,Inc.
  • cloudsecure-wp-security/trunk/modules/admin/two-factor-authentication-registration.php

    r3101467 r3438297  
    1313     */
    1414    private $default_key;
     15    /**
     16     * 秘密鍵が登録済みかどうか
     17     *
     18     * @var bool
     19     */
     20    private $is_registered;
    1521
    1622    function __construct( array $info, CloudSecureWP_Two_Factor_Authentication $two_factor_authentication ) {
     
    2531     */
    2632    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   = '';
    2836        if ( ! empty( $_POST ) && check_admin_referer( $this->two_factor_authentication->get_feature_key() . '_csrf' ) ) {
    2937            if ( ! empty( $_POST['key'] ) ) {
     
    4553                update_user_option( get_current_user_id(), 'cloudsecurewp_two_factor_authentication_secret', $key );
    4654                $this->messages[] = 'セットアップキーを保存しました。';
     55                // 保存後は秘密鍵を非表示にする
     56                $this->default_key   = '';
     57                $this->is_registered = true;
    4758            } else {
    4859                $this->errors[] = 'セットアップキーを保存できませんでした。<br />認証コードが間違っています。';
     
    7788            <div class="box">
    7889                <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>
    79104                    <div class="box-row flex-start">
    80105                        <div class="box-row-title not-label pt-12">
     
    172197            const qrcode = new QRCode('qrcode', {correctLevel: QRCode.CorrectLevel.M})
    173198
    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
    179202                const name = document.querySelector('.display-name').textContent
    180203
     
    185208            }
    186209
    187             showQRIfExists()
     210            // ページ読み込み時に秘密鍵が入力されている場合はQRコードを表示
     211            // (認証コードエラー時の再表示のため)
     212            const secretKey = document.getElementById('key').value
     213            if (secretKey) {
     214                showQRCode(secretKey)
     215            }
    188216
    189217            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)
    192221            })
    193222        </script>
  • cloudsecure-wp-security/trunk/readme.txt

    r3422588 r3438297  
    44Requires at least: 5.3.15
    55Tested up to: 6.9
    6 Stable tag: 1.3.22
     6Stable tag: 1.3.23
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    107107== Changelog ==
    108108
     109= 1.3.23 =
     110* 軽微な修正
     111
    109112= 1.3.22 =
    110113* 2段階認証に関する軽微な修正
Note: See TracChangeset for help on using the changeset viewer.