Custom Contact Forms - Version 5.1.0.3

Version Description

  • custom-contact-forms-front.php - $field_value properly escaped
Download this release

Release Info

Developer tlovett1
Plugin Icon 128x128 Custom Contact Forms
Version 5.1.0.3
Comparing to
See all releases

Code changes from version 5.1.0.2 to 5.1.0.3

README.md ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ custom-contact-forms
2
+ ====================
3
+
4
+ Custom Contact Forms is a WordPress plugin
custom-contact-forms-front.php CHANGED
@@ -13,7 +13,6 @@ if (!class_exists('CustomContactFormsFront')) {
13
  var $current_thank_you_message;
14
 
15
  function frontInit() {
16
- ccf_utils::startSession();
17
  $this->processForms();
18
  }
19
 
@@ -196,6 +195,7 @@ if (!class_exists('CustomContactFormsFront')) {
196
  }
197
 
198
  function getFormCode($form, $is_widget_form = false) {
 
199
  if (empty($form)) return '';
200
  $admin_options = parent::getAdminOptions();
201
  $form_key = time();
@@ -223,13 +223,13 @@ if (!class_exists('CustomContactFormsFront')) {
223
  $req = ($field->field_required == 1 or $field->field_slug == 'ishuman') ? '* ' : '';
224
  $req_long = ($field->field_required == 1) ? ' ' . __('(required)', 'custom-contact-forms') : '';
225
  $input_id = 'id="'.ccf_utils::decodeOption($field->field_slug, 1, 1).'-'.$form_key.'"';
226
- $field_value = ccf_utils::decodeOption($field->field_value, 1, 1);
227
  $instructions = (empty($field->field_instructions)) ? '' : 'title="' . esc_attr($field->field_instructions) . $req_long . '" ';
228
  $tooltip_class = (empty($field->field_instructions)) ? '' : 'ccf-tooltip-field';
229
  if ($admin_options['enable_widget_tooltips'] == 0 && $is_widget_form) $instructions = '';
230
  if (isset($_SESSION['ccf_fields'][$field->field_slug])) {
231
  if ($admin_options['remember_field_values'] == 1)
232
- $field_value = $_SESSION['ccf_fields'][$field->field_slug];
233
  } if ($field->field_slug == 'captcha') {
234
  $out .= '<div>' . "\n" . $this->getCaptchaCode($field, $form->id) . "\n" . '</div>' . "\n";
235
  } elseif ( $field->field_slug == 'recaptcha' ) {
@@ -684,4 +684,4 @@ if (!class_exists('CustomContactFormsFront')) {
684
  return $email_array2;
685
  }
686
  }
687
- }
13
  var $current_thank_you_message;
14
 
15
  function frontInit() {
 
16
  $this->processForms();
17
  }
18
 
195
  }
196
 
197
  function getFormCode($form, $is_widget_form = false) {
198
+ ccf_utils::startSession();
199
  if (empty($form)) return '';
200
  $admin_options = parent::getAdminOptions();
201
  $form_key = time();
223
  $req = ($field->field_required == 1 or $field->field_slug == 'ishuman') ? '* ' : '';
224
  $req_long = ($field->field_required == 1) ? ' ' . __('(required)', 'custom-contact-forms') : '';
225
  $input_id = 'id="'.ccf_utils::decodeOption($field->field_slug, 1, 1).'-'.$form_key.'"';
226
+ $field_value = esc_attr( ccf_utils::decodeOption($field->field_value, 1, 1) );
227
  $instructions = (empty($field->field_instructions)) ? '' : 'title="' . esc_attr($field->field_instructions) . $req_long . '" ';
228
  $tooltip_class = (empty($field->field_instructions)) ? '' : 'ccf-tooltip-field';
229
  if ($admin_options['enable_widget_tooltips'] == 0 && $is_widget_form) $instructions = '';
230
  if (isset($_SESSION['ccf_fields'][$field->field_slug])) {
231
  if ($admin_options['remember_field_values'] == 1)
232
+ $field_value = esc_attr( $_SESSION['ccf_fields'][$field->field_slug] );
233
  } if ($field->field_slug == 'captcha') {
234
  $out .= '<div>' . "\n" . $this->getCaptchaCode($field, $form->id) . "\n" . '</div>' . "\n";
235
  } elseif ( $field->field_slug == 'recaptcha' ) {
684
  return $email_array2;
685
  }
686
  }
687
+ }
custom-contact-forms.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Custom Contact Forms
4
  Plugin URI: http://taylorlovett.com/wordpress-plugins
5
  Description: Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, form submissions saved to database, captchas, tooltip popovers, unlimited fields/forms/form styles, import/export, use a custom thank you page or built-in popover with a custom success message set for each form.
6
- Version: 5.1.0.2
7
  Author: Taylor Lovett
8
  Author URI: http://www.taylorlovett.com
9
  */
3
  Plugin Name: Custom Contact Forms
4
  Plugin URI: http://taylorlovett.com/wordpress-plugins
5
  Description: Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, form submissions saved to database, captchas, tooltip popovers, unlimited fields/forms/form styles, import/export, use a custom thank you page or built-in popover with a custom success message set for each form.
6
+ Version: 5.1.0.3
7
  Author: Taylor Lovett
8
  Author URI: http://www.taylorlovett.com
9
  */
modules/export/custom-contact-forms-export.php CHANGED
@@ -132,6 +132,13 @@ if (!class_exists('CustomContactFormsExport')) {
132
  function importFromFile($file, $settings = array('mode' => 'clear_import', 'import_general_settings' => false, 'import_forms' => true,'import_fields' => true, 'import_field_options' => true, 'import_styles' => true, 'import_saved_submissions' => false)) {
133
  $path = CCF_BASE_PATH. 'import/';
134
  $file_name = basename(time() . $file['name']);
 
 
 
 
 
 
 
135
  if (move_uploaded_file($file['tmp_name'], $path . $file_name)) {
136
  $data = file_get_contents($path . $file_name);
137
  $data = preg_replace('/^#.*?[\n\r]*$/ims', '', $data);
132
  function importFromFile($file, $settings = array('mode' => 'clear_import', 'import_general_settings' => false, 'import_forms' => true,'import_fields' => true, 'import_field_options' => true, 'import_styles' => true, 'import_saved_submissions' => false)) {
133
  $path = CCF_BASE_PATH. 'import/';
134
  $file_name = basename(time() . $file['name']);
135
+ $file_extension = pathinfo($file['name'], PATHINFO_EXTENSION);
136
+
137
+ if ( stripos( $file_extension, 'sql' ) ) {
138
+ unlink( $file['tmp_name'] );
139
+ wp_die( 'You can only import .sql files.' );
140
+ }
141
+
142
  if (move_uploaded_file($file['tmp_name'], $path . $file_name)) {
143
  $data = file_get_contents($path . $file_name);
144
  $data = preg_replace('/^#.*?[\n\r]*$/ims', '', $data);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.taylorlovett.com
4
  Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers
5
  Requires at least: 2.8.1
6
  Tested up to: 3.4.1
7
- Stable tag: 5.1.0.2
8
 
9
  A customizable and intuitive contact form plugin for Wordpress.
10
 
@@ -143,8 +143,11 @@ We are planning to add popover forms and file attachments soon.
143
  Visit http://www.taylorlovett.com/wordpress-plugins for screenshots. Right now all the screenshots are from Version 1, thus are quite out-dated. Install the plugin to see what it looks like. You won't regret it. I promise!
144
 
145
  == Changelog ==
 
 
 
146
 
147
- = 5.0.0.1 =
148
  * custom-contact-forms-admin.php - Small UI updates
149
  * css/custom-contact-forms-admin.css - New admin styles
150
 
4
  Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers
5
  Requires at least: 2.8.1
6
  Tested up to: 3.4.1
7
+ Stable tag: 5.1.0.3
8
 
9
  A customizable and intuitive contact form plugin for Wordpress.
10
 
143
  Visit http://www.taylorlovett.com/wordpress-plugins for screenshots. Right now all the screenshots are from Version 1, thus are quite out-dated. Install the plugin to see what it looks like. You won't regret it. I promise!
144
 
145
  == Changelog ==
146
+
147
+ = 5.1.0.3 =
148
+ * custom-contact-forms-front.php - $field_value properly escaped
149
 
150
+ = 5.1.0.1 =
151
  * custom-contact-forms-admin.php - Small UI updates
152
  * css/custom-contact-forms-admin.css - New admin styles
153