Plugin Directory

Changeset 3491864


Ignore:
Timestamp:
03/26/2026 02:23:24 PM (8 days ago)
Author:
bestwebsoft
Message:

"V5.2.8 - * New features added. "

Location:
captcha-bws
Files:
379 added
5 edited

Legend:

Unmodified
Added
Removed
  • captcha-bws/trunk/captcha-bws.php

    r3395743 r3491864  
    77Text Domain: captcha-bws
    88Domain Path: /languages
    9 Version: 5.2.7
     9Version: 5.2.8
    1010Author URI: https://bestwebsoft.com/
    1111License: GPLv2 or later
     
    279279            add_filter( 'lgnrgstrfrm_check_field', 'cptch_check_login_register_form', 10 );
    280280        }
     281
     282        /* Add Force Strong Passwords to login/register forms */
     283        add_action( 'validate_password_reset', 'cptch_validate_password_reset_form', 10, 2 );
    281284
    282285        do_action( 'cptch_add_to_cf7' );
     
    927930    function cptch_check_login_register_form( $allow ) {
    928931        return cptch_check_custom_form( true, 'string', 'bws_login_register' );
     932    }
     933}
     934
     935if ( ! function_exists( 'cptch_validate_password_reset_form' ) ) {
     936    function cptch_validate_password_reset_form( $errors, $user ) {
     937        if ( isset( $_POST['pass1'] ) && ! empty( $_POST['pass1'] ) ) {
     938
     939            global $cptch_options;
     940
     941            if ( empty( $cptch_options ) ) {
     942                $cptch_options = get_option( 'cptch_options' );
     943            }
     944
     945            $result = cptch_validate_password( $_POST['pass1'] );
     946            if ( false === $result ) {
     947                $errors->add( 'cptch_error', str_replace( '{min_length}', $cptch_options['fsp_length'], $cptch_options['fsp_error_message'] ) );
     948            }
     949        }
     950
     951        return $errors;
     952    }
     953}
     954
     955if ( ! function_exists( 'cptch_validate_password' ) ) {
     956    function cptch_validate_password( $password ) {
     957        global $cptch_options;
     958
     959        if ( empty( $cptch_options ) ) {
     960            $cptch_options = get_option( 'cptch_options' );
     961        } 
     962   
     963        $pattern = '/^[a-zA-Z\d\!\@\#\$\%\^\&\*\(\)\-\_\[\]\{\}\<\>\~\`\+\=\,\.\;\:\/\?\|\'\"\\\\]{' . $cptch_options['fsp_length'] . ',25}$/';
     964   
     965        if ( strlen( $password ) < $cptch_options['fsp_length'] || ! preg_match( $pattern, $password ) ) {
     966            return false;
     967        }
     968        return true;
    929969    }
    930970}
     
    21362176            wp_enqueue_style( 'cptch_stylesheet', plugins_url( 'css/style.css', __FILE__ ), array(), $cptch_plugin_info['Version'] );
    21372177
    2138             wp_enqueue_script( 'cptch_script', plugins_url( 'js/script.js', __FILE__ ), array( 'jquery', 'jquery-ui-resizable', 'jquery-ui-tabs', 'wp-color-picker' ), $cptch_plugin_info['Version'], true );
     2178            wp_enqueue_script( 'cptch_script', plugins_url( 'js/script.js', __FILE__ ), array( 'jquery', 'jquery-ui-resizable', 'jquery-ui-tabs', 'wp-color-picker' ), $cptch_plugin_info['Version'] . '.2', true );
    21392179            wp_enqueue_style( 'wp-color-picker' );
    21402180            if ( 'captcha.php' == $_REQUEST['page'] ) {
  • captcha-bws/trunk/includes/class-cptch-settings-tabs.php

    r3392136 r3491864  
    162162                'wpforo_reply_form'         => array(
    163163                    'name' => esc_html__( 'wpForo Reply form', 'captcha-bws' ),
     164                    'for_pro' => 1,
     165                ),
     166                'edd_login_form'         => array(
     167                    'name' => esc_html__( 'Easy Digital Downloads Login Form', 'captcha-pro' ),
     168                    'for_pro' => 1,
     169                ),
     170                'edd_register_form'         => array(
     171                    'name' => esc_html__( 'Easy Digital Downloads Registration Form', 'captcha-pro' ),
     172                    'for_pro' => 1,
     173                ),
     174                'edd_lost_password_form'         => array(
     175                    'name' => esc_html__( 'Easy Digital Downloads Lost Password Form', 'captcha-pro' ),
    164176                    'for_pro' => 1,
    165177                ),
     
    291303                        ),
    292304                    ),
     305                    'edd_forms' => array(
     306                        'title'  => 'Easy Digital Downloads',
     307                        'forms' => array(
     308                            'edd_login_form',
     309                            'edd_register_form',
     310                            'edd_lost_password_form',
     311                        ),
     312                    ),
    293313                ),
    294314            );
     
    308328                $this->form_categories['other_for_pro']['wpforo']['forms'],
    309329                $this->form_categories['other_for_pro']['learndash']['forms'],
    310                 $this->form_categories['other_for_pro']['bboss']['forms']
     330                $this->form_categories['other_for_pro']['bboss']['forms'],
     331                $this->form_categories['other_for_pro']['edd_forms']['forms']
    311332            );
    312333
     
    401422            $this->options['images_count']  = isset( $_REQUEST['cptch_images_count'] ) ? absint( $_REQUEST['cptch_images_count'] ) : 4;
    402423            $this->options['forms']['general']['time_limit']    = isset( $_REQUEST['cptch_time_limit'] ) ? absint( $_REQUEST['cptch_time_limit'] ) : 120;
     424
     425            /* Force Strong Passwords */
     426            $this->options['fsp_enable'] = isset( $_POST['cptch_force_strong_passwords'] ) ? 1 : 0;
     427            $this->options['fsp_length'] = isset( $_POST['cptch_fsp_length'] ) && 12 <= intval( $_POST['cptch_fsp_length'] ) ? intval( $_POST['cptch_fsp_length'] ) : 12;
     428            $this->options['fsp_error_message'] = isset( $_POST['cptch_fsp_error_message'] ) ? sanitize_text_field( wp_unslash( $_POST['cptch_fsp_error_message'] ) ) : __( 'Password must be at least {min_length} characters long and include uppercase and lowercase letters and numbers.', 'captcha-bws' );
     429
    403430
    404431            /*
     
    819846                    </td>
    820847                </tr>
     848                <tr valign="top">
     849                    <th scope="row"><?php esc_html_e( 'Force Strong Passwords (FSP)', 'captcha-bws' ); ?></th>
     850                    <td>
     851                        <input<?php echo wp_kses_post( $this->change_permission_attr ); ?> id="cptch_force_strong_passwords" type="checkbox" <?php checked( isset( $this->options['fsp_enable'] ) && 1 === $this->options['fsp_enable'] ); ?> name="cptch_force_strong_passwords" value="1" />
     852                        <span class="bws_info">
     853                            <?php esc_html_e( 'Requires passwords to include uppercase and lowercase letters and numbers, with a minimum length. Applies only to the default WordPress registration form.', 'captcha-bws' ); ?>
     854                        </span>
     855                    </td>
     856                </tr>
     857                <tr class="cptch_fsp" valign="top">
     858                    <th scope="row"><?php esc_html_e( 'Minimum Password Length', 'captcha-bws' ); ?></th>
     859                    <td>
     860                        <input<?php echo wp_kses_post( $this->change_permission_attr ); ?> class="small-text" type="number" name="cptch_fsp_length" value="<?php echo intval( $this->options['fsp_length'] ); ?>" min="12" max="25" step="1" />
     861                        <span class="bws_info">
     862                            <?php esc_html_e( 'Set the minimum number of characters required for a password.', 'captcha-bws' ); ?>
     863                        </span>
     864                    </td>
     865                </tr>
     866                <tr class="cptch_fsp" valign="top">
     867                    <th scope="row"><?php esc_html_e( 'Password Error Message', 'captcha-bws' ); ?></th>
     868                    <td>
     869                        <textarea name="cptch_fsp_error_message"><?php echo esc_html( $this->options['fsp_error_message'] ); ?></textarea><br />
     870                        <span class="bws_info">
     871                            <?php esc_html_e( 'Use the following shortcode in your message', 'captcha-bws' ); ?>: <code>{min_length}</code>
     872                        </span>
     873                    </td>
     874                </tr>
    821875            </table>
    822876            <?php
  • captcha-bws/trunk/includes/helpers.php

    r3392136 r3491864  
    3232            'title'                         => '',
    3333            'required_symbol'               => '*',
    34             'text_start_slide'              => esc_html__( 'Slide to verify', 'captcha-bws' ),
    35             'text_end_slide'                => esc_html__( 'Verification passed', 'captcha-bws' ),
     34            'text_start_slide'              => __( 'Slide to verify', 'captcha-bws' ),
     35            'text_end_slide'                => __( 'Verification passed', 'captcha-bws' ),
    3636            'display_reload_button'         => true,
    3737            'enlarge_images'                => false,
     
    4040            'time_limit'                    => 120,
    4141            'enable_session'                => true,
    42             'no_answer'                     => esc_html__( 'Please complete the captcha.', 'captcha-bws' ),
    43             'wrong_answer'                  => esc_html__( 'Please enter correct captcha value.', 'captcha-bws' ),
    44             'time_limit_off'                => esc_html__( 'Time limit exceeded. Please complete the captcha once again.', 'captcha-bws' ),
    45             'time_limit_off_notice'         => esc_html__( 'Time limit exceeded. Please complete the captcha once again.', 'captcha-bws' ),
    46             'allowlist_message'             => esc_html__( 'Your IP address is allow listed.', 'captcha-bws' ),
     42            'no_answer'                     => __( 'Please complete the captcha.', 'captcha-bws' ),
     43            'wrong_answer'                  => __( 'Please enter correct captcha value.', 'captcha-bws' ),
     44            'time_limit_off'                => __( 'Time limit exceeded. Please complete the captcha once again.', 'captcha-bws' ),
     45            'time_limit_off_notice'         => __( 'Time limit exceeded. Please complete the captcha once again.', 'captcha-bws' ),
     46            'allowlist_message'             => __( 'Your IP address is allow listed.', 'captcha-bws' ),
    4747            'load_via_ajax'                 => false,
    4848            'use_limit_attempts_allowlist'  => false,
     
    5353            'all_day'                       => array( 1, 2, 3, 4, 5, 6, 7 ),
    5454            'hours'                         => array(),
     55            'fsp_enable'                    => 0,
     56            'fsp_length'                    => 12,
     57            'fsp_error_message'             => __( 'Password must be at least {min_length} characters long and include uppercase and lowercase letters, numbers and symbols.', 'captcha-bws' ),
    5558        );
    5659
  • captcha-bws/trunk/js/script.js

    r3392136 r3491864  
    136136            }
    137137        } );
     138
     139        $( '#cptch_force_strong_passwords' ).change( function() {
     140            if ( $( this ).is( ':checked' ) ) {
     141                $( '.cptch_fsp' ).show();
     142            } else {
     143                $( '.cptch_fsp' ).hide();
     144            }
     145        } ).trigger( 'change' );
    138146    } );
    139147} )( jQuery );
  • captcha-bws/trunk/readme.txt

    r3395743 r3491864  
    44Tags: captcha, spam protection, security, antispam, captcha WooCommerce, OCR-friendly captcha, Math captcha, WordPress captcha, human verification, security plugin, spam prevention, CAPTCHA plugin, WordPress security, form protection
    55Requires at least: 6.2
    6 Tested up to: 6.8.2
    7 Stable tag: 5.2.7
     6Tested up to: 6.9.4
     7Stable tag: 5.2.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2525= Free Features =
    2626
    27 * **Add Captcha to:**
     27* Add captcha to:
    2828    * Login form
    2929    * Registration form
     
    3333    * [Contact Form](https://bestwebsoft.com/products/wordpress/plugins/contact-form/?k=7f973058ee3bd3a18934b5e13b857d6f)
    3434    * [Car Rental V2 Pro](https://bestwebsoft.com/products/wordpress/plugins/car-rental-v2/?k=9feda3ea8564e0b0707c5434786ddf24)
    35     * Custom forms
    36 * **Choose Captcha Type:**
    37     * Invisible Captcha
    38     * Character Recognition Captcha
    39     * Math Captcha (simple math operations like addition, subtraction, multiplication)
    40     * Slide Captcha
    41 * **Enhance Captcha Protection with:**
     35    * Custom form
     36* Choose Captcha type:
     37    * Invisible
     38    * Character Recognition
     39    * Simple math actions such as addition, subtraction, and multiplication
     40    * Slide captcha
     41* Enhance captcha protection with:
    4242    * Letters
    4343    * Numbers
    4444    * Images
    45 * **Hide Captcha for:**
     45* Hide captcha for:
    4646    * Registered users in comments form
    47 * **Additional Features:**
    48     * Set captcha submission time limit
    49     * Settings for displaying captchas by Weekdays and Hours
    50     * Refresh captcha option
    51     * Edit captcha title and notifications
    52     * Compatible with the latest WordPress version
    53     * User-friendly settings for quick setup without coding
    54     * Comprehensive documentation and tutorial videos
    55     * Multilingual and RTL ready
    56 
    57 ## Pro Features
    58 
    59 All Free features plus:
    60 
    61 * **Enhanced Compatibility:**
    62     * Contact Form 7 (since v3.4)
    63     * [Subscriber](https://bestwebsoft.com/products/wordpress/plugins/subscriber/?k=ac02c12d6e17bc91f4cc636eec0a0348)
    64     * Jetpack Contact Form
    65     * MailChimp for WordPress
    66     * Ninja Forms
    67     * Gravity Forms
    68     * WPForms
    69     * Caldera Forms
    70     * Formidable Contact Form
    71     * MemberPress
    72 * **WooCommerce Integration:**
    73     * Login form
    74     * Register form
    75     * Lost password form
    76     * Checkout billing form
    77 * **bbPress Integration:**
    78     * New Topic form
    79     * Reply form
    80 * **BuddyPress Integration:**
    81     * Registration form
    82     * Comments form
    83     * Create a Group form
    84 * **wpForo Integration:**
    85     * Login form
    86     * Registration form
    87     * New Topic form
    88     * Reply form
    89 * **Divi Integration:**
    90     * Contact Form
    91     * Login Form
    92 * **LearnDash and BuddyBoss Integration:**
    93     * LearnDash Login and Registration forms
    94     * BuddyBoss Registration form
    95 * **Elementor Pro Integration:**
    96     * Elementor Contact form
    97 * **Compatible with BWS Login Register Form:
    98     * Login form
    99     * Registration form
    100     * Forgot Password form
    101 * **Advanced Features:**
    102     * Hide captcha for allowed IP addresses
    103     * Merge IP addresses from [Limit Attempts](https://bestwebsoft.com/products/wordpress/plugins/limit-attempts/?k=c6b924d096b75a288daf0e49a58f93c2) plugin with Captcha Allow List
    104     * Configure all subsites on the network
    105     * Set captcha submission time limits for individual forms
    106     * Image packages with hand-drawn digits
    107     * Add and activate unlimited image packages simultaneously
    108     * Customize Slide Captcha appearance
    109     * Block disposable emails
    110     * Add custom code via plugin settings page
    111     * Receive support responses within one business day ([Support Policy](https://bestwebsoft.com/support-policy/))
     47* Set captcha submission time limit
     48* Settings for displaying captchas by Weekdays and Hours
     49* Refresh captcha option
     50* Edit captcha title and notifications
     51* Compatible with latest WordPress version
     52* Incredibly simple settings for fast setup without modifying code
     53* Detailed step-by-step documentations and videos
     54* Multilingual and RTL ready
     55* Force Strong Passwords
     56
     57> **Pro Features**
     58>
     59> All features from Free version included plus:
     60>
     61> * Compatible with :
     62>   * Contact Form 7 (since v 3.4)
     63>   * [Subscriber](https://bestwebsoft.com/products/wordpress/plugins/subscriber/?k=ac02c12d6e17bc91f4cc636eec0a0348)
     64>   * Jetpack contact form
     65>   * MailChimp for WordPress
     66>   * Ninja Forms
     67>   * Gravity Forms
     68>   * WPForms
     69>   * Caldera Forms
     70>   * Formidable Contact Form
     71>   * MemberPress
     72> * Compatible with WooCommerce:
     73>   * Login form
     74>   * Register form
     75>   * Lost password form
     76>   * Checkout billing form
     77> * Compatible with bbPress:
     78>   * New Topic form
     79>   * Reply form
     80> * Compatible with BuddyPress:
     81>   * Registration form
     82>   * Comments form
     83>   * Create a Group form
     84> * Compatible with Forums - wpForo:
     85>   * Login form
     86>   * Registration form
     87>   * New Topic form
     88>   * Reply form
     89> * Compatible with Divi :
     90>   * Contact Form
     91>   * Login Form
     92> * Compatible with LearnDash login:
     93>   * Login form
     94>   * Registration form
     95> * Compatible with BuddyBoss:
     96>   * Registration form
     97> * Compatible with Elementor Pro:
     98>   * Elementor Contact form [NEW]
     99> * Compatible with BWS Login Register Form:
     100>   * Login form
     101>   * Registration form
     102>   * Forgot Password form
     103> * Compatible with Easy Digital Downloads Form:
     104>   * Login form
     105>   * Registration form
     106>   * Forgot Password form
     107> * Hide captcha for:
     108>   * Allowed IP addresses
     109> * Merge IP addresses from [Limit Attempts](https://bestwebsoft.com/products/wordpress/plugins/limit-attempts/?k=a9ab60b2d4016ae9c809733d84012988) plugin with Captcha Allow List
     110> * Configure all subsites on the network
     111> * Captcha submission time limit for separate forms
     112> * Image packages with hand-drawn digits
     113> * Add and enable unlimited number of image packages at the same time
     114> * Edit Slide captcha appearance
     115> * Block disposable emails
     116> * Add custom code via plugin settings page
     117> * Get answer to your support question within one business day ([Support Policy](https://bestwebsoft.com/support-policy/))
    112118
    113119[**Upgrade to Pro Now**](https://bestwebsoft.com/products/wordpress/plugins/captcha/?k=2d2d85a3c277bf3489697c9a9ff2d352)
     
    308314== Changelog ==
    309315
     316= V5.2.8 - 20.03.2026 =
     317* Update : All functionality was updated for WordPress 6.9.4
     318* NEW : The new functionality Force Strong Passwords has been added.
     319* PRO : The new compatibility with Easy Digital Downloads Forms has been added.
     320* Update : BWS Panel section was updated.
     321
    310322= V5.2.7 - 14.11.2025 =
    311323* Bugfix : Syntax error has been fixed.
     
    449461== Upgrade Notice ==
    450462
     463= V5.2.8 =
     464* New features added.
     465* The compatibility with new WordPress version updated.
     466
    451467= V5.2.7 =
    452468* Bugs fixed.
Note: See TracChangeset for help on using the changeset viewer.