Contact Form Email - Version 1.3.17

Version Description

  • New invisible antispam captcha protection: honeypot, smart scripts, ...
Download this release

Release Info

Developer codepeople
Plugin Icon 128x128 Contact Form Email
Version 1.3.17
Comparing to
See all releases

Code changes from version 1.3.16 to 1.3.17

README.txt CHANGED
@@ -456,6 +456,9 @@ When you click a field already added into the contact form builder area, you can
456
 
457
  == Changelog ==
458
 
 
 
 
459
  = 1.3.16 =
460
  * Compatible with WordPress 5.6
461
 
@@ -1102,5 +1105,5 @@ When you click a field already added into the contact form builder area, you can
1102
 
1103
  == Upgrade Notice ==
1104
 
1105
- = 1.3.16 =
1106
- * Compatible with WordPress 5.6
456
 
457
  == Changelog ==
458
 
459
+ = 1.3.17 =
460
+ * New invisible antispam captcha protection: honeypot, smart scripts, ...
461
+
462
  = 1.3.16 =
463
  * Compatible with WordPress 5.6
464
 
1105
 
1106
  == Upgrade Notice ==
1107
 
1108
+ = 1.3.17 =
1109
+ * New invisible antispam captcha protection: honeypot, smart scripts, ...
cp-admin-int-list.inc.php CHANGED
@@ -60,6 +60,7 @@ if (isset($_GET['a']) && $_GET['a'] == '1')
60
  'vs_text_min' => $this->get_option('vs_text_min', CP_CFEMAIL_DEFAULT_vs_text_min),
61
 
62
  'cv_enable_captcha' => $this->get_option('cv_enable_captcha', CP_CFEMAIL_DEFAULT_cv_enable_captcha),
 
63
  'cv_width' => $this->get_option('cv_width', CP_CFEMAIL_DEFAULT_cv_width),
64
  'cv_height' => $this->get_option('cv_height', CP_CFEMAIL_DEFAULT_cv_height),
65
  'cv_chars' => $this->get_option('cv_chars', CP_CFEMAIL_DEFAULT_cv_chars),
60
  'vs_text_min' => $this->get_option('vs_text_min', CP_CFEMAIL_DEFAULT_vs_text_min),
61
 
62
  'cv_enable_captcha' => $this->get_option('cv_enable_captcha', CP_CFEMAIL_DEFAULT_cv_enable_captcha),
63
+ 'cv_enable_captchaintelligent' => $this->get_option('cv_enable_captchaintelligent', CP_CFEMAIL_DEFAULT_cv_enable_captchainvisible),
64
  'cv_width' => $this->get_option('cv_width', CP_CFEMAIL_DEFAULT_cv_width),
65
  'cv_height' => $this->get_option('cv_height', CP_CFEMAIL_DEFAULT_cv_height),
66
  'cv_chars' => $this->get_option('cv_chars', CP_CFEMAIL_DEFAULT_cv_chars),
cp-admin-int.inc.php CHANGED
@@ -499,9 +499,26 @@ if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST[$this->prefix.'_post_
499
 
500
  <div class="ahb-adintsection" data-step="5">
501
  <div class="inside">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
502
  <table class="form-table">
503
  <tr valign="top">
504
- <th scope="row">Use Antispam Captcha Verification?</th>
505
  <td colspan="5">
506
  <?php $option = $this->get_option('cv_enable_captcha', CP_CFEMAIL_DEFAULT_cv_enable_captcha); ?>
507
  <select name="cv_enable_captcha">
499
 
500
  <div class="ahb-adintsection" data-step="5">
501
  <div class="inside">
502
+
503
+ <table class="form-table">
504
+ <tr valign="top">
505
+ <th scope="row">Use invisible "intelligent" spam prevention?*</th>
506
+ <td colspan="5">
507
+ <?php $option = $this->get_option('cv_enable_captchaintelligent', CP_CFEMAIL_DEFAULT_cv_enable_captchainvisible); ?>
508
+ <select name="cv_enable_captchaintelligent">
509
+ <option value="true"<?php if ($option == 'true') echo ' selected'; ?>>Yes</option>
510
+ <option value="false"<?php if ($option != 'true') echo ' selected'; ?>>No</option>
511
+ </select><br />
512
+ <em>* Uses invisible spam protection methods (honeypot, smart scripts, etc...). This can be used at the same time than the classic captcha or you can also keep
513
+ only one of these options enabled.</em>
514
+ </td>
515
+ </tr>
516
+ </table>
517
+ <hr />
518
+
519
  <table class="form-table">
520
  <tr valign="top">
521
+ <th scope="row">Use classic antispam Captcha image Verification?</th>
522
  <td colspan="5">
523
  <?php $option = $this->get_option('cv_enable_captcha', CP_CFEMAIL_DEFAULT_cv_enable_captcha); ?>
524
  <select name="cv_enable_captcha">
cp-main-class.inc.php CHANGED
@@ -88,6 +88,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
88
  rep_message text,
89
 
90
  cv_enable_captcha VARCHAR(20) DEFAULT '' NOT NULL,
 
91
  cv_width VARCHAR(20) DEFAULT '' NOT NULL,
92
  cv_height VARCHAR(20) DEFAULT '' NOT NULL,
93
  cv_chars VARCHAR(20) DEFAULT '' NOT NULL,
@@ -168,6 +169,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
168
  'rep_message' => $this->get_option('rep_message', 'Attached you will find the data with the form submissions.'),
169
 
170
  'cv_enable_captcha' => $this->get_option('cv_enable_captcha', CP_CFEMAIL_DEFAULT_cv_enable_captcha),
 
171
  'cv_width' => $this->get_option('cv_width', CP_CFEMAIL_DEFAULT_cv_width),
172
  'cv_height' => $this->get_option('cv_height', CP_CFEMAIL_DEFAULT_cv_height),
173
  'cv_chars' => $this->get_option('cv_chars', CP_CFEMAIL_DEFAULT_cv_chars),
@@ -748,6 +750,19 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
748
  echo 'ok';
749
  exit;
750
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
751
 
752
  //if (get_magic_quotes_gpc())
753
  foreach ($_POST as $item => $value)
@@ -1050,7 +1065,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
1050
  foreach ($_POST as $item => $value)
1051
  if (!is_array($value))
1052
  $_POST[$item] = stripcslashes($value);
1053
-
1054
  $this->add_field_verify($wpdb->prefix.$this->table_items, "rep_enable", "VARCHAR(10)");
1055
  $this->add_field_verify($wpdb->prefix.$this->table_items, "rep_days", "VARCHAR(10)");
1056
  $this->add_field_verify($wpdb->prefix.$this->table_items, "rep_hour", "VARCHAR(10)");
@@ -1069,6 +1084,8 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
1069
  $this->add_field_verify($wpdb->prefix.$this->table_items, "fp_enableemail", "VARCHAR(10)");
1070
 
1071
  $this->add_field_verify($wpdb->prefix.$this->table_items, "fp_emailfrommethod", "text");
 
 
1072
 
1073
  $wpdb->update ( $wpdb->prefix.$this->table_items,
1074
  array(
@@ -1115,6 +1132,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
1115
  'rep_emailformat' => sanitize_text_field($_POST['rep_emailformat']),
1116
  'rep_message' => $this->clean_sanitize($_POST['rep_message']),
1117
 
 
1118
  'cv_enable_captcha' => sanitize_text_field($_POST['cv_enable_captcha']),
1119
  'cv_width' => sanitize_text_field($_POST['cv_width']),
1120
  'cv_height' => sanitize_text_field($_POST['cv_height']),
88
  rep_message text,
89
 
90
  cv_enable_captcha VARCHAR(20) DEFAULT '' NOT NULL,
91
+ cv_enable_captchaintelligent VARCHAR(20) DEFAULT '' NOT NULL,
92
  cv_width VARCHAR(20) DEFAULT '' NOT NULL,
93
  cv_height VARCHAR(20) DEFAULT '' NOT NULL,
94
  cv_chars VARCHAR(20) DEFAULT '' NOT NULL,
169
  'rep_message' => $this->get_option('rep_message', 'Attached you will find the data with the form submissions.'),
170
 
171
  'cv_enable_captcha' => $this->get_option('cv_enable_captcha', CP_CFEMAIL_DEFAULT_cv_enable_captcha),
172
+ 'cv_enable_captchaintelligent' => $this->get_option('cv_enable_captchaintelligent', CP_CFEMAIL_DEFAULT_cv_enable_captchainvisible),
173
  'cv_width' => $this->get_option('cv_width', CP_CFEMAIL_DEFAULT_cv_width),
174
  'cv_height' => $this->get_option('cv_height', CP_CFEMAIL_DEFAULT_cv_height),
175
  'cv_chars' => $this->get_option('cv_chars', CP_CFEMAIL_DEFAULT_cv_chars),
750
  echo 'ok';
751
  exit;
752
  }
753
+
754
+ if ($this->get_option('cv_enable_captchaintelligent', CP_CFEMAIL_DEFAULT_cv_enable_captchainvisible) == 'true')
755
+ {
756
+ if (
757
+ (!isset($_POST["cftecontrolmessage"]) || $_POST["cftecontrolmessage"] != '') ||
758
+ (!isset($_POST["cftehp"]) || $_POST["cftehp"] != '25') ||
759
+ !wp_verify_nonce( $_POST['anonce'], 'cfte_actions_emailform')
760
+ )
761
+ {
762
+ echo 'Invisible antispam protection prevented this submission. Please contact our support service if you think this is an error. Thank you.';
763
+ exit;
764
+ }
765
+ }
766
 
767
  //if (get_magic_quotes_gpc())
768
  foreach ($_POST as $item => $value)
1065
  foreach ($_POST as $item => $value)
1066
  if (!is_array($value))
1067
  $_POST[$item] = stripcslashes($value);
1068
+
1069
  $this->add_field_verify($wpdb->prefix.$this->table_items, "rep_enable", "VARCHAR(10)");
1070
  $this->add_field_verify($wpdb->prefix.$this->table_items, "rep_days", "VARCHAR(10)");
1071
  $this->add_field_verify($wpdb->prefix.$this->table_items, "rep_hour", "VARCHAR(10)");
1084
  $this->add_field_verify($wpdb->prefix.$this->table_items, "fp_enableemail", "VARCHAR(10)");
1085
 
1086
  $this->add_field_verify($wpdb->prefix.$this->table_items, "fp_emailfrommethod", "text");
1087
+
1088
+ $this->add_field_verify($wpdb->prefix.$this->table_items, "cv_enable_captchaintelligent", "VARCHAR(10)");
1089
 
1090
  $wpdb->update ( $wpdb->prefix.$this->table_items,
1091
  array(
1132
  'rep_emailformat' => sanitize_text_field($_POST['rep_emailformat']),
1133
  'rep_message' => $this->clean_sanitize($_POST['rep_message']),
1134
 
1135
+ 'cv_enable_captchaintelligent' => $_POST['cv_enable_captchaintelligent'],
1136
  'cv_enable_captcha' => sanitize_text_field($_POST['cv_enable_captcha']),
1137
  'cv_width' => sanitize_text_field($_POST['cv_width']),
1138
  'cv_height' => sanitize_text_field($_POST['cv_height']),
cp-public-int.inc.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php if ( !defined('CP_AUTH_INCLUDE') ) { echo 'Direct access not allowed.'; exit; } ?>
2
- <form class="cpp_form" name="<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>" id="<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>" action="<?php $this->get_site_url(); ?>" method="post" enctype="multipart/form-data" onsubmit="return <?php echo $this->prefix; ?>_pform_doValidate<?php echo '_'.$this->print_counter; ?>(this);"><input type="hidden" name="cp_pform_psequence" value="<?php echo '_'.$this->print_counter; ?>" /><input type="hidden" name="<?php echo $this->prefix; ?>_pform_process" value="1" /><input type="hidden" name="<?php echo $this->prefix; ?>_id" value="<?php echo $this->item; ?>" /><input type="hidden" name="cp_ref_page" value="<?php esc_attr($this->get_site_url()); ?>" /><input type="hidden" name="form_structure<?php echo '_'.$this->print_counter; ?>" id="form_structure<?php echo '_'.$this->print_counter; ?>" size="180" value="<?php echo $raw_form_str; ?>" /><input type="hidden" name="refpage<?php echo '_'.$this->print_counter; ?>" id="refpage<?php echo '_'.$this->print_counter; ?>" value=""><input type="hidden" name="<?php echo $this->prefix; ?>_pform_status" value="0" /><?php if (count($preload_params)) { ?><input type="hidden" name="edititem" value="<?php echo $preload_params["itemnumber"]; ?>" /><?php } ?>
3
  <?php if (is_admin() && !defined('APHOURBK_ELEMENTOR_EDIT_MODE') && @$_GET["action"] != 'edit') {?>
4
  <fieldset style="border: 1px solid black; -webkit-border-radius: 8px; -moz-border-radius: 8px; border-radius: 8px; padding:15px;">
5
  <legend>Administrator options</legend>
@@ -13,6 +13,7 @@
13
  </div>
14
  </div>
15
  <div style="display:none">
 
16
  <div id="cpcaptchalayer<?php echo '_'.$this->print_counter; ?>" class="cpcaptchalayer">
17
  <?php if (!is_admin() && $this->get_option('cv_enable_captcha', CP_CFEMAIL_DEFAULT_cv_enable_captcha) != 'false') { ?>
18
  <?php _e("Security Code",'contact-form-to-email'); ?>:<br />
@@ -26,6 +27,9 @@
26
  </div>
27
  <div id="cp_subbtn<?php echo '_'.$this->print_counter; ?>" class="cp_subbtn"><?php _e($button_label); ?></div>
28
  </form>
 
 
 
29
  <?php if (defined('APBCT_NAME')) { ?>
30
  <script>
31
  setInterval('cfte<?php echo '_'.$this->print_counter; ?>()',2000);
1
  <?php if ( !defined('CP_AUTH_INCLUDE') ) { echo 'Direct access not allowed.'; exit; } ?>
2
+ <form class="cpp_form" name="<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>" id="<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>" action="<?php $this->get_site_url(); ?>" method="post" enctype="multipart/form-data" onsubmit="return <?php echo $this->prefix; ?>_pform_doValidate<?php echo '_'.$this->print_counter; ?>(this);"><input type="hidden" name="cp_pform_psequence" value="<?php echo '_'.$this->print_counter; ?>" /><input type="hidden" name="<?php echo $this->prefix; ?>_pform_process" value="1" /><input type="hidden" name="<?php echo $this->prefix; ?>_id" value="<?php echo $this->item; ?>" /><input type="hidden" name="cp_ref_page" value="<?php esc_attr($this->get_site_url()); ?>" /><input type="hidden" name="form_structure<?php echo '_'.$this->print_counter; ?>" id="form_structure<?php echo '_'.$this->print_counter; ?>" size="180" value="<?php echo $raw_form_str; ?>" /><input type="hidden" name="refpage<?php echo '_'.$this->print_counter; ?>" id="refpage<?php echo '_'.$this->print_counter; ?>" value=""><input type="hidden" name="<?php echo $this->prefix; ?>_pform_status" value="0" /><?php if (count($preload_params)) { ?><input type="hidden" name="edititem" value="<?php echo $preload_params["itemnumber"]; ?>" /><?php } ?><input name="anonce" type="hidden" value="<?php echo wp_create_nonce( 'cfte_actions_emailform' ); ?>"/><input name="cftehp" id="cftehp<?php echo '_'.$this->print_counter; ?>" type="hidden" value="1"/>
3
  <?php if (is_admin() && !defined('APHOURBK_ELEMENTOR_EDIT_MODE') && @$_GET["action"] != 'edit') {?>
4
  <fieldset style="border: 1px solid black; -webkit-border-radius: 8px; -moz-border-radius: 8px; border-radius: 8px; padding:15px;">
5
  <legend>Administrator options</legend>
13
  </div>
14
  </div>
15
  <div style="display:none">
16
+ <input name="cftecontrolmessage" type="text" value=""/>
17
  <div id="cpcaptchalayer<?php echo '_'.$this->print_counter; ?>" class="cpcaptchalayer">
18
  <?php if (!is_admin() && $this->get_option('cv_enable_captcha', CP_CFEMAIL_DEFAULT_cv_enable_captcha) != 'false') { ?>
19
  <?php _e("Security Code",'contact-form-to-email'); ?>:<br />
27
  </div>
28
  <div id="cp_subbtn<?php echo '_'.$this->print_counter; ?>" class="cp_subbtn"><?php _e($button_label); ?></div>
29
  </form>
30
+ <script>
31
+ try{document.getElementById("cftehp<?php echo '_'.$this->print_counter; ?>").value="25";}catch(e){}
32
+ </script>
33
  <?php if (defined('APBCT_NAME')) { ?>
34
  <script>
35
  setInterval('cfte<?php echo '_'.$this->print_counter; ?>()',2000);
form-to-email.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Contact Form Email
4
  Plugin URI: https://form2email.dwbooster.com/download
5
  Description: Contact form that sends the data to email and also to a database list and CSV file.
6
- Version: 1.3.16
7
  Author: CodePeople
8
  Author URI: https://form2email.dwbooster.com
9
  Text Domain: contact-form-to-email
@@ -37,7 +37,8 @@ define('CP_CFEMAIL_DEFAULT_vs_text_digits', 'Please enter only digits.');
37
  define('CP_CFEMAIL_DEFAULT_vs_text_max', 'Please enter a value less than or equal to %0%.');
38
  define('CP_CFEMAIL_DEFAULT_vs_text_min', 'Please enter a value greater than or equal to %0%.');
39
 
40
- define('CP_CFEMAIL_DEFAULT_cv_enable_captcha', 'true');
 
41
  define('CP_CFEMAIL_DEFAULT_cv_width', '170');
42
  define('CP_CFEMAIL_DEFAULT_cv_height', '65');
43
  define('CP_CFEMAIL_DEFAULT_cv_chars', '5');
3
  Plugin Name: Contact Form Email
4
  Plugin URI: https://form2email.dwbooster.com/download
5
  Description: Contact form that sends the data to email and also to a database list and CSV file.
6
+ Version: 1.3.17
7
  Author: CodePeople
8
  Author URI: https://form2email.dwbooster.com
9
  Text Domain: contact-form-to-email
37
  define('CP_CFEMAIL_DEFAULT_vs_text_max', 'Please enter a value less than or equal to %0%.');
38
  define('CP_CFEMAIL_DEFAULT_vs_text_min', 'Please enter a value greater than or equal to %0%.');
39
 
40
+ define('CP_CFEMAIL_DEFAULT_cv_enable_captcha', 'false');
41
+ define('CP_CFEMAIL_DEFAULT_cv_enable_captchainvisible', 'true');
42
  define('CP_CFEMAIL_DEFAULT_cv_width', '170');
43
  define('CP_CFEMAIL_DEFAULT_cv_height', '65');
44
  define('CP_CFEMAIL_DEFAULT_cv_chars', '5');