Plugin Directory

Changeset 3382491


Ignore:
Timestamp:
10/22/2025 10:01:20 AM (5 months ago)
Author:
chrmrtns
Message:

Release 3.0.4 - Critical wp-login.php options conflict fix

FIX: Critical - Cannot login when both 'Enable Login on wp-login.php' and 'Redirect wp-login.php' options are active
IMPROVEMENT: Added mutual exclusion logic - redirect automatically disables wp-login.php magic login integration
IMPROVEMENT: Added admin warning notice explaining conflicts with actionable guidance
IMPROVEMENT: Enhanced help text under both options explaining incompatibility
UX: Clear visual feedback with yellow warning box when conflicting options are enabled
TECHNICAL: wp-login.php integration hooks only fire when redirect is disabled

Location:
keyless-auth
Files:
65 added
4 edited

Legend:

Unmodified
Added
Removed
  • keyless-auth/trunk/includes/Admin/Pages/OptionsPage.php

    r3380037 r3382491  
    131131                            <input type="checkbox" id="chrmrtns_kla_enable_wp_login" name="chrmrtns_kla_enable_wp_login" value="1" <?php checked($enable_wp_login, '1'); ?> />
    132132                            <p class="description">
    133                                 <?php esc_html_e('Add a magic login field to the WordPress login page (wp-login.php).', 'keyless-auth'); ?>
    134                             </p>
     133                                <?php esc_html_e('Add a magic login field to the WordPress login page (wp-login.php). Note: This option is incompatible with the wp-login.php redirect option below.', 'keyless-auth'); ?>
     134                            </p>
     135                            <?php
     136                            $redirect_wp_login = get_option('chrmrtns_kla_redirect_wp_login', '0') === '1';
     137                            if ($enable_wp_login === '1' && $redirect_wp_login): ?>
     138                                <div class="notice notice-warning inline" style="margin: 10px 0 0 0; padding: 10px;">
     139                                    <p><strong><?php esc_html_e('Notice:', 'keyless-auth'); ?></strong>
     140                                    <?php esc_html_e('This option is currently inactive because "Redirect all wp-login.php requests" is enabled below. The redirect takes priority and prevents the magic login field from appearing on wp-login.php.', 'keyless-auth'); ?></p>
     141                                    <p style="margin-bottom: 0;"><?php esc_html_e('To use magic login on wp-login.php, disable the redirect option below.', 'keyless-auth'); ?></p>
     142                                </div>
     143                            <?php endif; ?>
    135144                        </td>
    136145                    </tr>
     
    154163                            <label for="chrmrtns_kla_redirect_wp_login"><?php esc_html_e('Redirect all wp-login.php requests to custom login page', 'keyless-auth'); ?></label>
    155164                            <p class="description">
    156                                 <?php esc_html_e('When enabled, all requests to wp-login.php will be redirected to your custom login page. Emergency bypass: add ?kla_use_wp_login=1 to access wp-login.php directly.', 'keyless-auth'); ?>
     165                                <?php esc_html_e('When enabled, all requests to wp-login.php will be redirected to your custom login page. Note: When enabled, this automatically disables magic login integration on wp-login.php since users will be redirected away. Emergency bypass: add ?kla_use_wp_login=1 to access wp-login.php directly.', 'keyless-auth'); ?>
    157166                            </p>
    158167                        </td>
  • keyless-auth/trunk/includes/Core/Core.php

    r3382425 r3382491  
    3434        add_shortcode('keyless-auth-full', array($this, 'render_full_login_form'));
    3535
    36         // wp-login.php integration - only add hooks if enabled
    37         if (get_option('chrmrtns_kla_enable_wp_login', '0') === '1') {
     36        // wp-login.php integration - only add hooks if enabled AND redirect is disabled
     37        // These options are mutually exclusive: can't add magic login field to wp-login.php
     38        // if we're redirecting away from it
     39        $enable_wp_login = get_option('chrmrtns_kla_enable_wp_login', '0') === '1';
     40        $redirect_wp_login = get_option('chrmrtns_kla_redirect_wp_login', '0') === '1';
     41
     42        if ($enable_wp_login && !$redirect_wp_login) {
    3843            add_action('login_footer', array($this, 'chrmrtns_kla_add_wp_login_field'));
    3944            add_action('login_init', array($this, 'chrmrtns_kla_handle_wp_login_submission'));
  • keyless-auth/trunk/keyless-auth.php

    r3382425 r3382491  
    44* Plugin URI: https://github.com/chrmrtns/keyless-auth
    55* Description: Enhanced passwordless authentication allowing users to login securely without passwords via email magic links. Fork of Passwordless Login by Cozmoslabs with additional security features.
    6 * Version: 3.0.3
     6* Version: 3.0.4
    77* Author: Chris Martens
    88* Author URI: https://github.com/chrmrtns
     
    3838
    3939// Define plugin constants
    40 define('CHRMRTNS_KLA_VERSION', '3.0.3');
     40define('CHRMRTNS_KLA_VERSION', '3.0.4');
    4141define('CHRMRTNS_KLA_PLUGIN_DIR', plugin_dir_path(__FILE__));
    4242define('CHRMRTNS_KLA_PLUGIN_URL', plugin_dir_url(__FILE__));
  • keyless-auth/trunk/readme.txt

    r3382425 r3382491  
    66Requires at least: 3.9
    77Tested up to: 6.8
    8 Stable tag: 3.0.3
     8Stable tag: 3.0.4
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    305305
    306306== Changelog ==
     307
     308= 3.0.4 =
     309* FIX: Critical - wp-login.php options conflict - cannot login when both "Enable Login on wp-login.php" and "Redirect wp-login.php" are active
     310* IMPROVEMENT: Added mutual exclusion logic - redirect option now automatically disables wp-login.php magic login integration
     311* IMPROVEMENT: Added admin warning notice explaining when options conflict and why one is disabled
     312* IMPROVEMENT: Enhanced help text under both options explaining their incompatibility
     313* UX: Clear visual feedback when conflicting options are enabled with actionable guidance
     314* TECHNICAL: wp-login.php integration hooks only fire when redirect is disabled to prevent login issues
    307315
    308316= 3.0.3 =
Note: See TracChangeset for help on using the changeset viewer.