From e1bf14e9e0835a51595d7666d35247ea2eaceeec Mon Sep 17 00:00:00 2001 From: nikitozzzzzzz Date: Tue, 15 May 2018 15:41:28 +0300 Subject: [PATCH] - deprecated time checking spam bot; --- includes/admin/core/class-admin-settings.php | 1 - includes/core/class-form.php | 13 ------------- includes/core/um-actions-password.php | 19 ------------------- 3 files changed, 33 deletions(-) diff --git a/includes/admin/core/class-admin-settings.php b/includes/admin/core/class-admin-settings.php index ba23548a..bea6bdc2 100644 --- a/includes/admin/core/class-admin-settings.php +++ b/includes/admin/core/class-admin-settings.php @@ -2181,7 +2181,6 @@ Cache User Profile: options()->get( 'um_profile_object_cache_s Generate Slugs on Directories: options()->get( 'um_generate_slug_in_directory' ) == 1 ){ echo "No"; }else{ echo "Yes"; } echo "\n"; ?> Rewrite Rules: options()->get( 'um_flush_stop' ) == 1 ){ echo "No"; }else{ echo "Yes"; } echo "\n"; ?> Force UTF-8 Encoding: options()->get( 'um_force_utf8_strings' ) == 1 ){ echo "Yes"; }else{ echo "No"; } echo "\n"; ?> -Time Check Security: options()->get( 'enable_timebot' ) == 1 ){ echo "Yes"; }else{ echo "No"; } echo "\n"; ?> JS/CSS Compression: Network Structure: options()->get( 'network_permalink_structure' ). "\n"; ?> diff --git a/includes/core/class-form.php b/includes/core/class-form.php index a5fc3c6e..9b5ff609 100644 --- a/includes/core/class-form.php +++ b/includes/core/class-form.php @@ -331,19 +331,6 @@ if ( ! class_exists( 'um\core\Form' ) ) { wp_die( 'Hello, spam bot!', 'ultimate-member' ); } - if ( ! in_array( $this->form_data['mode'], array( 'login' ) ) ) { - - $form_timestamp = trim($_POST['timestamp']); - $live_timestamp = current_time( 'timestamp' ); - - if ( $form_timestamp == '' && UM()->options()->get( 'enable_timebot' ) == 1 ) - wp_die( __('Hello, spam bot!','ultimate-member') ); - - if ( !current_user_can('manage_options') && $live_timestamp - $form_timestamp < 6 && UM()->options()->get( 'enable_timebot' ) == 1 ) - wp_die( __('Whoa, slow down! You\'re seeing this message because you tried to submit a form too fast and we think you might be a spam bot. If you are a real human being please wait a few seconds before submitting the form. Thanks!','ultimate-member') ); - - } - /** * UM hook * diff --git a/includes/core/um-actions-password.php b/includes/core/um-actions-password.php index 876ca53c..041153e8 100644 --- a/includes/core/um-actions-password.php +++ b/includes/core/um-actions-password.php @@ -133,15 +133,6 @@ function um_reset_password_errors_hook( $args ) { if ( $_POST[ UM()->honeypot ] != '' ) wp_die('Hello, spam bot!','ultimate-member'); - $form_timestamp = trim($_POST['timestamp']); - $live_timestamp = current_time( 'timestamp' ); - - if ( $form_timestamp == '' && UM()->options()->get( 'enable_timebot' ) == 1 ) - wp_die( __('Hello, spam bot!','ultimate-member') ); - - if ( $live_timestamp - $form_timestamp < 3 && UM()->options()->get( 'enable_timebot' ) == 1 ) - wp_die( __('Whoa, slow down! You\'re seeing this message because you tried to submit a form too fast and we think you might be a spam bot. If you are a real human being please wait a few seconds before submitting the form. Thanks!','ultimate-member') ); - $user = ""; foreach ( $_POST as $key => $val ) { @@ -197,16 +188,6 @@ function um_change_password_errors_hook( $args ) { wp_die('Hello, spam bot!','ultimate-member'); } - $form_timestamp = trim($_POST['timestamp']); - $live_timestamp = current_time( 'timestamp' ); - - if ( $form_timestamp == '' && UM()->options()->get( 'enable_timebot' ) == 1 ) - wp_die( __('Hello, spam bot!','ultimate-member') ); - - if ( $live_timestamp - $form_timestamp < 3 && UM()->options()->get( 'enable_timebot' ) == 1 ) { - wp_die( __('Whoa, slow down! You\'re seeing this message because you tried to submit a form too fast and we think you might be a spam bot. If you are a real human being please wait a few seconds before submitting the form. Thanks!','ultimate-member') ); - } - $reset_pass_hash = ''; if( isset( $_REQUEST['act'] ) && $_REQUEST['act'] == 'reset_password' && um_is_core_page('password-reset') ){