Plugin Directory

Changeset 3203207


Ignore:
Timestamp:
12/05/2024 06:01:12 PM (16 months ago)
Author:
kaminsky.m
Message:

2.25 release 1

Location:
ajax-login-and-registration-modal-popup
Files:
711 added
6 edited

Legend:

Unmodified
Added
Removed
  • ajax-login-and-registration-modal-popup/trunk/ajax-login-registration-modal-popup.php

    r3085209 r3203207  
    44    Plugin URI:     https://maxim-kaminsky.com/shop/product/ajax-login-and-registration-modal-popup-pro/
    55    Description:    Easy to integrate modal with Login and Registration features + inline form using shortcode.
    6     Version:        2.24
     6    Version:        2.25
    77    Author URI:     http://maxim-kaminsky.com/
    88    Author:         Maxim K
  • ajax-login-and-registration-modal-popup/trunk/assets/lrm-core.js

    r2892257 r3203207  
    9797        //$("form.cart").on('submit', signup_selected);
    9898
    99         var handle_event = is_mobile_or_tablet() ? 'touchend' : 'click';
     99        //var handle_event = is_mobile_or_tablet() ? 'touchend' : 'click';
    100100
    101101        //open sign-up form
    102102        $(document).on('click', '.lrm-signup', signup_selected);
    103         $(document).on(handle_event, '[class*="lrm-register"]', signup_selected);
     103        $(document).on('touchend click', '[class*="lrm-register"]', signup_selected);
    104104        $(document).on('click', '.lrm-switch-to--register', signup_selected);
    105105
    106106        //open login-form form
    107107        $(document).on('click', '.lrm-signin', login_selected);
    108         $(document).on(handle_event, '[class*="lrm-login"]', login_selected);
     108        $(document).on('touchend click', '[class*="lrm-login"]', login_selected);
    109109        $(document).on('click', '.lrm-switch-to--login', login_selected);
    110110
     
    115115
    116116        //close modal
    117         $('.lrm-user-modal').on('click', function (event) {
     117        $('.lrm-user-modal').on('mousedown', function (event) {
    118118            if ($(event.target).is('.lrm-user-modal') || $(event.target).is('.lrm-close-form')) {
    119119                // Check reCaptha, etc
     
    202202            }
    203203
     204            if (event) {
     205                event.stopPropagation();
     206                event.preventDefault();
     207            }
    204208            /**
    205209             * @since 1.34
     
    251255            }, 100);
    252256
    253             if (event) {
    254                 event.preventDefault();
    255             }
    256257            return false;
    257258        }
     
    262263            }
    263264
     265            if (event) {
     266                event.stopPropagation();
     267                event.preventDefault();
     268            }
    264269            /**
    265270             * @since 1.34
     
    337342            }, 100);
    338343
    339             if (event) {
    340                 event.preventDefault();
    341             }
    342344            return false;
    343345        }
     
    542544            }
    543545
    544             if ( !passwordStrength || passwordStrength <= 2 ) {
    545                 $(".pw-weak").show()
    546                 $(".pw-checkbox").attr("required", "required");
    547             } else {
    548                 $(".pw-weak").hide()
    549                 $(".pw-checkbox").attr("required", false);
     546            if ( "yes_allow_weak" == LRM.validate_password_strength ) {
     547                if (!passwordStrength || passwordStrength <= 2) {
     548                    $(".pw-weak").show()
     549                    $(".pw-checkbox").attr("required", "required");
     550                } else {
     551                    $(".pw-weak").hide()
     552                    $(".pw-checkbox").attr("required", false);
     553                }
    550554            }
    551555        });
     
    563567        dataFilter: function (raw_response, dataType) {
    564568            // We only want to work with JSON
    565             if ('json' !== dataType) {
     569            if ('json' !== dataType || !raw_response) {
    566570                return raw_response;
    567571            }
     
    648652
    649653        return LRM.loadPasswordMeter(function() {
    650             var pass1 = $pass1.val();
     654            var pass1 = $pass1.val().trim();
    651655            if ( !pass1 ) {
    652656                $strengthResult.data('status','empty');
    653                 return;
    654             }
    655 
    656             if ( "no" === LRM.validate_password_strength ) {
    657                 if ( $pass2 && $pass2.val().trim() && $pass2.val() !== $pass1.val() ) {
    658                     $strengthResult.attr('data-status','short').html(LRM.l10n.passwords_is_mismatch);
    659                 } else {
    660                     $strengthResult.attr('data-status', null);
    661                 }
    662                 return null;
     657                return 0;
    663658            }
    664659
     
    669664            }
    670665
     666            if ( "no" === LRM.validate_password_strength ) {
     667                if ( $pass2 && pass2 !== pass1 ) {
     668                    $strengthResult.attr('data-status', 'short').html(LRM.l10n.passwords_is_mismatch);
     669                    return 5;
     670                } else if ( pass1.length < 3 || $pass2 && pass2.length < 3 ) {
     671                    $strengthResult.attr('data-status','short').html(LRM.l10n.password_is_short);
     672                    return 1;
     673                } else {
     674                    $strengthResult.attr('data-status', null);
     675                }
     676                return 0;
     677            }
     678
    671679            //$strengthResult.removeClass('short bad good strong');
    672680
    673681            // Extend our blacklist array with those from the inputs & site data
    674             var blacklistArray = ["querty", "password", "P@ssword1", "132", "123"]
     682            var blacklistArray = ["querty", "password", "P@ssword1", "132", "123", "admin", "user"]
    675683
    676684            // Get the password strength
     
    745753            // Double the length because Opera is inconsistent about whether a carriage return is one character or two. Sigh.
    746754            var len = jQuery(this).val().length * 2;
    747             this.trigger('focus');
     755            jQuery(this).trigger('focus');
    748756            this.setSelectionRange(len, len);
    749757        } else {
  • ajax-login-and-registration-modal-popup/trunk/includes/class-core.php

    r3085209 r3203207  
    4242            add_action( 'wp_loaded', array($this, 'process_ajax'), 9 );
    4343        }
    44 
    45         // RUN PRO UPDATER
    46         if ( file_exists(LRM_PATH . 'vendor/plugin-update-checker/plugin-update-checker.php') && is_admin() && lrm_is_pro() && !lrm_is_pro('1.50') ) {
    47 
    48             require LRM_PATH . 'vendor/plugin-update-checker/plugin-update-checker.php';
    49             $myUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
    50                 'https://addons-updater.wp-vote.net/?action=get_metadata&slug=ajax-login-and-registration-modal-popup-pro',
    51                 LRM_PRO_PATH . 'login-registration-modal-pro.php', //Full path to the main plugin file or functions.php.
    52                 'ajax-login-and-registration-modal-popup-pro'
    53             );
    54         }
    55 
     44       
    5645        //if ( class_exists('LRM_Pro') ) {
    5746        //} else {
  • ajax-login-and-registration-modal-popup/trunk/includes/class-settings.php

    r2892257 r3203207  
    170170        // Update notice for 1.18 > 1.20
    171171
    172         if ( ! get_option( 'lrm_beg_message' ) ) {
     172        if ( true || ! get_option( 'lrm_beg_message' ) ) {
    173173            echo '<div class="notice notice-info notification-notice"><p>';
    174174
    175175            printf( __( 'Do you like "Login and Register Modal" plugin? Please consider giving it a %1$sreview%2$s', 'ajax-login-and-registration-modal-popup' ), '<a href="https://wordpress.org/support/plugin/ajax-login-and-registration-modal-popup/reviews/#new-post" class="button button-secondary" target="_blank">⭐⭐⭐⭐⭐ ', '</a>' );
    176176
    177             echo '<a href="' . add_query_arg( array('action'=>'dismiss_rem_beg_message', '_wpnonce' => wp_create_nonce('lrm-beg-dismiss')) ) . '" class="dismiss-beg-message button" type="submit" style="float: right;">';
     177            echo '<a href="' . esc_url( add_query_arg( array('action'=>'dismiss_rem_beg_message', '_wpnonce' => wp_create_nonce('lrm-beg-dismiss')) ) ) . '" class="dismiss-beg-message button" type="submit" style="float: right;">';
    178178            _e( 'I already reviewed it', 'ajax-login-and-registration-modal-popup' );
    179179            echo '</a>';
  • ajax-login-and-registration-modal-popup/trunk/readme.txt

    r3085209 r3203207  
    33Tags: login, registration, register, lost password, modal, popup, ajax, form
    44Requires at least: 4.1
    5 Tested up to: 6.5.3
     5Tested up to: 6.7.1
    66Requires PHP: 5.5
    77Stable tag: trunk
     
    211211== Changelog ==
    212212
     213= VER 2.25 - 05/12/2024 =
     214
     215- Admin XSS Vulnerability fix (thanks to @vgo0 and WordFence)
     216- Tested with WordPress version to 6.7.1
     217- Removed Plugin update checked (moved to the Pro version)
     218
    213219= VER 2.24 - 12/05/2024 =
    214220
  • ajax-login-and-registration-modal-popup/trunk/views/form-parts/lost-password.php

    r3085209 r3203207  
    88                <?php $email_label = esc_attr( lrm_setting('messages/lost_password/email', true) ); ?>
    99                <label class="image-replace lrm-email lrm-ficon-mail" title="<?= $email_label; ?>"></label>
    10                 <input class="full-width has-padding has-border" name="user_login" type="text" <?= $fields_required; ?> placeholder="<?= esc_attr($email_label); ?>" data-autofocus="1" aria-label="<?= esc_attr($email_label); ?>">
     10                <input class="full-width has-padding has-border" name="user_login" type="text" <?= $fields_required; ?> placeholder="<?= $email_label; ?>" data-autofocus="1" aria-label="<?= $email_label; ?>">
    1111                <span class="lrm-error-message"></span>
    1212            </div>
Note: See TracChangeset for help on using the changeset viewer.