Plugin Directory

Changeset 3229199


Ignore:
Timestamp:
01/27/2025 08:01:49 AM (13 months ago)
Author:
10web
Message:
  • Fixed: Security issue fix.
Location:
form-maker/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • form-maker/trunk/admin/views/Themes_fm.php

    r2316673 r3229199  
    229229                      foreach($tabs as $tkey => $tab) {
    230230                        $active_class = $active_tab == $tkey ? "fm-theme-active-tab" : "";
    231                             echo '<li><a id="'.$tkey.'" href="#" class="button '.$active_class . ($row->version == 1 && $tkey != 'custom_css' ? ' fm-disabled' : '') . '">'.$tab.'</a></li>';
     231                            echo '<li><a id="' . esc_attr($tkey) . '" href="#" class="button ' . esc_attr($active_class . ($row->version == 1 && $tkey != 'custom_css' ? ' fm-disabled' : '')) . '">' . esc_html($tab) . '</a></li>';
    232232                      }
    233233                      ?>
     
    239239                      foreach($all_params as $pkey => $params) {
    240240                        $show_hide_class = $active_tab == $pkey ? '' : 'fm-hide';
    241                         echo '<div id="'.$pkey.'-content" class="fm-themes-container '.$show_hide_class.'">';
     241                        echo '<div id="' . esc_attr($pkey) . '-content" class="fm-themes-container ' . esc_attr($show_hide_class) . '">';
    242242                        if ($row->version == 1 && $pkey == 'custom_css') {
    243                           echo '<div class="error inline"><p>' . __('This theme is outdated. Theme Options are only available in new themes provided by Form Maker. You can use Custom CSS panel to edit form styling, or alternatively select a new theme for your form.', WDFMInstance(self::PLUGIN)->prefix) . '</p></div>';
     243                          echo '<div class="error inline"><p>' . esc_html__('This theme is outdated. Theme Options are only available in new themes provided by Form Maker. You can use Custom CSS panel to edit form styling, or alternatively select a new theme for your form.', WDFMInstance(self::PLUGIN)->prefix) . '</p></div>';
    244244                        }
    245245                          foreach($params as $param){
    246246                            if($param["type"] == 'panel') {
    247                               echo '<div class="'.$param["class"].'">';
     247                              echo '<div class="' . esc_attr($param["class"]) . '">';
    248248                            }
    249249                            if($param["type"] != 'panel' || ($param["type"] == 'panel' && $param["label"]) )
    250250                              echo '<div class="fm-row">';
    251251                            if($param["type"] == 'panel' && $param["label"]) {
    252                               echo '<label class="'.$param["label_class"].'" >'.$param["label"].'</label>'.$param["after"];
     252                              echo '<label class="' . esc_attr($param["label_class"]) . '" >' . esc_html($param["label"]) . '</label>' . wp_kses_post($param["after"]);
    253253                            } else {
    254254                              if($param["type"] == 'text') {
    255                                     echo '<label class="fm-label-text">'.$param["label"].'</label>
    256                                             <div class="fm-input-text-wrap fm-input-text-wrap-'.$param["name"].'">
    257                                                 <input type="'.$param["type"].'" name="'.$param["name"].'" class="'.$param["class"].'" ng-model="'.$param["name"].'" ng-init="'.$param["name"].'=\''.$param["value"].'\'" value="' . $param["value"] . '" placeholder="'. (isset($param["placeholder"]) ? $param["placeholder"] : "") .'"  title="'.(isset($param["placeholder"]) ? $param["placeholder"] : "").'" />'. $param["after"] .
     255                                    echo '<label class="fm-label-text">' . esc_html($param["label"]) . '</label>
     256                                            <div class="fm-input-text-wrap fm-input-text-wrap-' . esc_attr($param["name"]) . '">
     257                                                <input type="' . esc_attr($param["type"]) . '" name="' . esc_attr($param["name"]) . '" class="' . esc_attr($param["class"]) . '" ng-model="' . esc_attr($param["name"]) . '" ng-init="' . esc_attr($param["name"]) . '=\'' . esc_attr($param["value"]) . '\'" value="' . esc_attr($param["value"]) . '" placeholder="' . esc_attr(isset($param["placeholder"]) ? $param["placeholder"] : "") . '"  title="' . esc_attr(isset($param["placeholder"]) ? $param["placeholder"] : "") . '" />' . wp_kses_post($param["after"]) .
    258258                                            '</div>';
    259259                              }
    260260                              else {
    261261                                if($param["type"] == '2text') {
    262                                   echo '<label class="fm-label-2text">'.$param["label"].'</label>
    263                                   <div class="'.$param["class"].'" style="display:inline-block; vertical-align: middle;">
     262                                  echo '<label class="fm-label-2text">' . esc_html($param["label"]) . '</label>
     263                                  <div class="' . esc_attr($param["class"]) . '" style="display:inline-block; vertical-align: middle;">
    264264                                    <div style="float:left;display:table-row;">
    265                                       <span style="display:table-cell;">'.$param["before1"].'</span><input type="text" name="'.$param["name1"].'" ng-model="'.$param["name1"].'" ng-init="'.$param["name1"].'=\''.$param["value1"].'\'" value="'.$param["value1"].'" placeholder="'.(isset($param["placeholder"]) ? $param["placeholder"] : "").'"  title="'.(isset($param["placeholder"]) ? $param["placeholder"] : "").'" style="display:table-cell; "/>'.$param["after"].'
     265                                      <span style="display:table-cell;">' . esc_html($param["before1"]) . '</span><input type="text" name="' . esc_attr($param["name1"]) . '" ng-model="' . esc_attr($param["name1"]) . '" ng-init="' . esc_attr($param["name1"]) . '=\'' . esc_attr($param["value1"]) . '\'" value="' . esc_attr($param["value1"]) . '" placeholder="' . esc_attr(isset($param["placeholder"]) ? $param["placeholder"] : "") . '"  title="' . esc_attr(isset($param["placeholder"]) ? $param["placeholder"] : "") . '" style="display:table-cell; "/>' . wp_kses_post($param["after"]) .'
    266266                                    </div>
    267267                                    <div style="float:left;display:table-row;">
    268                                       <span style="display:table-cell;">'.$param["before2"].'</span><input type="text" name="'.$param["name2"].'" class="'.$param["class"].'" ng-model="'.$param["name2"].'" ng-init="'.$param["name2"].'=\''.$param["value2"].'\'" value="'.$param["value2"].'" placeholder="'.(isset($param["placeholder"]) ? $param["placeholder"] : "").'" title="'.(isset($param["placeholder"]) ? $param["placeholder"] : "").'" style="display:table-cell; "/>'.$param["after"].'
     268                                      <span style="display:table-cell;">' . esc_html($param["before2"]) . '</span><input type="text" name="' . esc_attr($param["name2"]) . '" class="' . esc_attr($param["class"]) . '" ng-model="' . esc_attr($param["name2"]) . '" ng-init="' . esc_attr($param["name2"]) . '=\'' . esc_attr($param["value2"]) . '\'" value="' . esc_attr($param["value2"]) . '" placeholder="' . esc_attr(isset($param["placeholder"]) ? $param["placeholder"] : "") . '" title="' . esc_attr(isset($param["placeholder"]) ? $param["placeholder"] : "") . '" style="display:table-cell; "/>' . wp_kses_post($param["after"]) .'
    269269                                    </div>
    270270                                  </div>';
     
    272272                                else {
    273273                                  if($param["type"] == 'select') {
    274                                         echo '<label class="fm-label-select">'.$param["label"].'</label>
     274                                        echo '<label class="fm-label-select">' . esc_html($param["label"]) . '</label>
    275275                                                <div class="fm-select-wrap">
    276                                                 <select name="'.$param["name"].'" ng-model="'.$param["name"].'" ng-init="'.$param["name"].'=\''.$param["value"].'\'">';
     276                                                <select name="' . esc_attr($param["name"]) . '" ng-model="' . esc_attr($param["name"]) . '" ng-init="' . esc_attr($param["name"]) . '=\'' . esc_attr($param["value"]) . '\'">';
    277277                                                    foreach($param["options"] as $option_key => $option) {
    278                                                         echo '<option value="'.$option_key.'">'.$option.'</option>';
     278                                                        echo '<option value="' . esc_attr($option_key) . '">' . esc_html($option) . '</option>';
    279279                                                    }
    280                                                 echo '</select>'.$param["after"].
    281                                             '</div>';
     280                                                echo '</select>' . wp_kses_post($param["after"]).
     281                                   '</div>';
    282282                                  } else {
    283283                                    if($param["type"] == 'label') {
    284                                       echo '<label class="'.$param["class"].'" >'.$param["label"].'</label>'.$param["after"];
     284                                      echo '<label class="' . esc_attr($param["class"]) . '" >' . esc_html($param["label"]) . '</label>' . wp_kses_post($param["after"]);
    285285                                    } else {
    286286                                      if($param["type"] == 'checkbox') {
    287                                         echo '<label>'.$param["label"].'</label>
     287                                        echo '<label>' . esc_html($param["label"]) . '</label>
    288288                                          <div class="fm-btn-group">';
    289289                                        foreach($param["options"] as $op_key => $option){
     
    291291                                          $init = isset($param_values->{$param["name"].ucfirst($op_key)}) ? 'true' : 'false';
    292292                                          echo '<div class="fm-ch-button">
    293                                               <input type="checkbox" id="'.$param["name"].ucfirst($op_key).'" name="'.$param["name"].ucfirst($op_key).'" value="'.$op_key.'" ng-model="'.$param["name"].ucfirst($op_key).'" ng-checked="'.$param["name"].ucfirst($op_key).'" ng-init="'.$param["name"].ucfirst($op_key).'='.$init.'"><label for="'.$param["name"].ucfirst($op_key).'">'.$option.'</label>
     293                                              <input type="checkbox" id="' . esc_attr($param["name"]) . ucfirst($op_key) . '" name="' . esc_attr($param["name"]) . ucfirst($op_key) . '" value="' . esc_attr($op_key) . '" ng-model="' . esc_attr($param["name"]) . ucfirst($op_key) . '" ng-checked="' . esc_attr($param["name"]) . ucfirst($op_key) . '" ng-init="' . esc_attr($param["name"]) . ucfirst($op_key) . '=' . esc_attr($init) . '"><label for="' . esc_attr($param["name"]) . ucfirst($op_key) . '">' . esc_html($option) . '</label>
    294294                                            </div>';
    295295                                        }
     
    297297                                      } else {
    298298                                        if($param["type"] == 'radio'){
    299                         echo '<div class="fm_shake_row"><label>'.$param["label"].'</label>
     299                        echo '<div class="fm_shake_row"><label>' . esc_html($param["label"]) . '</label>
    300300                        <div class="fm-btn-group">';
    301301                            $checked = (!isset($param_values->{$param["name"]}) || (isset($param_values->{$param["name"]}) && $param_values->{$param["name"]} == 'yes')) ? true : false;
    302302                            $html = '<div class="fm-ch-select">';
    303                             $html .= '<input type="radio" '.(($checked)?"checked":"") .' id="'.$param["name"].'Yes" name="'.$param["name"].'" value="yes">';
    304                             $html .= '<label for="'.$param["name"].'Yes">'.__('Yes', WDFMInstance(self::PLUGIN)->prefix).'</label>';
    305                             $html .= '<input type="radio" '.((!$checked)?"checked":"") .' id="'.$param["name"].'No" name="'.$param["name"].'" value="no">';
    306                             $html .= '<label for="'.$param["name"].'No">'.__('No', WDFMInstance(self::PLUGIN)->prefix).'</label>';
     303                            $html .= '<input type="radio" ' . (($checked)?"checked":"") . ' id="' . esc_attr($param["name"]) . 'Yes" name="' . esc_attr($param["name"]) . '" value="yes">';
     304                            $html .= '<label for="' . esc_attr($param["name"]) . 'Yes">' . esc_html(__('Yes', WDFMInstance(self::PLUGIN)->prefix)) . '</label>';
     305                            $html .= '<input type="radio" ' . ((!$checked)?"checked":"") . ' id="' . esc_attr($param["name"]) . 'No" name="' . esc_attr($param["name"]) . '" value="no">';
     306                            $html .= '<label for="' . esc_attr($param["name"]) . 'No">' . esc_html(__('No', WDFMInstance(self::PLUGIN)->prefix)) . '</label>';
    307307                            $html .= '</div>';
    308308                            echo $html;
     
    311311                      } else {
    312312                        if ( $param["type"] == 'hidden' ) {
    313                           echo '<input type="' . $param["type"] . '" />' . $param["after"];
     313                          echo '<input type="' . esc_attr($param["type"]) . '" />' . wp_kses_post($param["after"]);
    314314                        } else {
    315315                          if ( $param["type"] == 'textarea' ) {
    316                             echo '<label>' . $param["label"] . '</label>
    317                                 <textarea name="' . $param["name"] . '" rows="5"  columns="10" style="vertical-align:middle;">' . $param["value"] . '</textarea>';
     316                            echo '<label>' . esc_html($param["label"]) . '</label>
     317                                <textarea name="' . esc_attr($param["name"]) . '" rows="5"  columns="10" style="vertical-align:middle;">' . esc_html($param["value"]) . '</textarea>';
    318318                          }
    319319                        }
  • form-maker/trunk/admin/views/view.php

    r2599814 r3229199  
    2525    ob_start();
    2626    // Form.
    27     $action = isset($attr['action']) ? esc_attr($attr['action']) : '';
    28     $method = isset($attr['method']) ? esc_attr($attr['method']) : 'post';
    29     $name = isset($attr['name']) ? esc_attr($attr['name']) : WDFMInstance(self::PLUGIN)->prefix . '_form';
    30     $id = isset($attr['id']) ? esc_attr($attr['id']) : '';
    31     $class = isset($attr['class']) ? esc_attr($attr['class']) : WDFMInstance(self::PLUGIN)->prefix . '_form';
    32     $style = isset($attr['style']) ? esc_attr($attr['style']) : '';
    33     $current_id = isset($attr['current_id']) ? esc_attr($attr['current_id']) : '';
     27    $action = isset($attr['action']) ? $attr['action'] : '';
     28    $method = isset($attr['method']) ? $attr['method'] : 'post';
     29    $name = isset($attr['name']) ? $attr['name'] : WDFMInstance(self::PLUGIN)->prefix . '_form';
     30    $id = isset($attr['id']) ? $attr['id'] : '';
     31    $class = isset($attr['class']) ? $attr['class'] : WDFMInstance(self::PLUGIN)->prefix . '_form';
     32    $style = isset($attr['style']) ? $attr['style'] : '';
     33    $current_id = isset($attr['current_id']) ? $attr['current_id'] : '';
    3434    ?>
    3535    <div id="fm-form-admin" class="wrap">
     
    4141    ?>
    4242      <form
    43           <?php echo $action ? 'action="' . $action . '"' : ''; ?>
    44           <?php echo $method ? 'method="' . $method . '"' : ''; ?>
    45           <?php echo $name ? ' name="' . $name . '"' : ''; ?>
    46           <?php echo $id ? ' id="' . $id . '"' : ''; ?>
    47           <?php echo $class ? ' class="' . $class . '"' : ''; ?>
    48           <?php echo $style ? ' style="' . $style . '"' : ''; ?>
     43          <?php echo $action ? 'action="' . esc_url($action) . '"' : ''; ?>
     44          <?php echo $method ? 'method="' . esc_attr($method) . '"' : ''; ?>
     45          <?php echo $name ? ' name="' . esc_attr($name) . '"' : ''; ?>
     46          <?php echo $id ? ' id="' . esc_attr($id) . '"' : ''; ?>
     47          <?php echo $class ? ' class="' . esc_attr($class) . '"' : ''; ?>
     48          <?php echo $style ? ' style="' . esc_attr($style) . '"' : ''; ?>
    4949      ><?php
    5050      echo $content;
     
    5353        ?>
    5454        <input id="task" name="task" type="hidden" value=""/>
    55         <input id="current_id" name="current_id" type="hidden" value="<?php echo $current_id; ?>"/>
     55        <input id="current_id" name="current_id" type="hidden" value="<?php echo esc_attr($current_id); ?>"/>
    5656      </form>
    5757    </div><?php
     
    7474        $add_new_button = !empty($params['add_new_button']) ? $params['add_new_button'] : '';
    7575
    76       $attributes = '';
    77     if ( !empty($add_new_button) && is_array($add_new_button) ) {
    78       foreach ( $add_new_button as $key => $val ) {
    79         $attributes .= $key . '="' . $val . '"';
    80       }
    81     }
    82     ob_start();
    83     ?><div class="wd-page-title <?php echo $title_class; ?>">
    84       <h1 class="wp-heading-inline"><?php echo $title; ?>
     76    $attributes = '';
     77    if (!empty($add_new_button) && is_array($add_new_button)) {
     78        foreach ($add_new_button as $key => $val) {
     79            $attributes .= esc_attr($key) . '="' . esc_attr($val) . '" ';
     80        }
     81    }
     82    ob_start();
     83    ?>
     84    <div class="wd-page-title <?php echo esc_attr($title_class); ?>">
     85      <h1 class="wp-heading-inline"><?php echo wp_kses_post($title); ?>
    8586      <?php
    8687      if ( $title_name || $title_id || $title_value ) {
    8788        ?>
    8889        <span id="fm-title-edit">
    89           <input type="text" id="<?php echo $title_id; ?>" name="<?php echo $title_name; ?>" value="<?php echo $title_value; ?>" />
     90          <input type="text" id="<?php echo esc_attr($title_id); ?>" name="<?php echo esc_attr($title_name); ?>" value="<?php echo esc_attr($title_value); ?>" />
    9091        </span>
    9192        <?php
     
    115116  protected function buttons( $buttons = array(), $single = FALSE, $parent = array() ) {
    116117    ob_start();
    117     if ( !$single ) {
    118       $parent_id = isset($parent['id']) ? esc_attr($parent['id']) : '';
    119       $parent_class = isset($parent['class']) ? esc_attr($parent['class']) : 'wd-buttons';
    120       $parent_style = isset($parent['style']) ? esc_attr($parent['style']) : '';
     118    if (!$single) {
     119      $parent_id = isset($parent['id']) ? $parent['id'] : '';
     120      $parent_class = isset($parent['class']) ? $parent['class'] : 'wd-buttons';
     121      $parent_style = isset($parent['style']) ? $parent['style'] : '';
    121122      ?>
    122     <div
    123       <?php echo $parent_id ? 'id="' . $parent_id . '"' : ''; ?>
    124       <?php echo $parent_class ? ' class="' . $parent_class . '"' : ''; ?>
    125       <?php echo $parent_style ? ' style="' . $parent_style . '"' : ''; ?>
     123      <div
     124        <?php echo $parent_id ? 'id="' . esc_attr($parent_id) . '"' : ''; ?>
     125        <?php echo $parent_class ? ' class="' . esc_attr($parent_class) . '"' : ''; ?>
     126        <?php echo $parent_style ? ' style="' . esc_attr($parent_style) . '"' : ''; ?>
    126127      >
    127128      <?php
    128129    }
    129130    foreach ($buttons as $button) {
    130       $title = isset($button['title']) ? esc_attr($button['title']) : '';
    131       $value = isset($button['value']) ? esc_attr($button['value']) : '';
    132       $name = isset($button['name']) ? esc_attr($button['name']) : '';
    133       $id = isset($button['id']) ? esc_attr($button['id']) : '';
    134       $class = isset($button['class']) ? esc_attr($button['class']) : '';
    135       $style = isset($button['style']) ? esc_attr($button['style']) : '';
    136       $onclick = isset($button['onclick']) ? esc_attr($button['onclick']) : '';
    137       ?><button type="submit"
    138                <?php echo $value ? ' value="' . $value . '"' : ''; ?>
    139                <?php echo $name ? ' name="' . $name . '"' : ''; ?>
    140                <?php echo $id ? ' id="' . $id . '"' : ''; ?>
    141                class="wd-button <?php echo $class; ?>"
    142                <?php echo $style ? ' style="' . $style . '"' : ''; ?>
    143                <?php echo $onclick ? ' onclick="' . $onclick . '"' : ''; ?>
    144          ><?php echo $title; ?></button><?php
     131      $title = isset($button['title']) ? $button['title'] : '';
     132      $value = isset($button['value']) ? $button['value'] : '';
     133      $name = isset($button['name']) ? $button['name'] : '';
     134      $id = isset($button['id']) ? $button['id'] : '';
     135      $class = isset($button['class']) ? $button['class'] : '';
     136      $style = isset($button['style']) ? $button['style'] : '';
     137      $onclick = isset($button['onclick']) ? $button['onclick'] : '';
     138      ?>
     139      <button type="submit"
     140        <?php echo $value ? ' value="' . esc_attr($value) . '"' : ''; ?>
     141        <?php echo $name ? ' name="' . esc_attr($name) . '"' : ''; ?>
     142        <?php echo $id ? ' id="' . esc_attr($id) . '"' : ''; ?>
     143        class="wd-button <?php echo esc_attr($class); ?>"
     144        <?php echo $style ? ' style="' . esc_attr($style) . '"' : ''; ?>
     145        <?php echo $onclick ? ' onclick="' . esc_attr($onclick) . '"' : ''; ?>
     146      ><?php echo esc_html($title); ?></button>
     147      <?php
    145148    }
    146149    if ( !$single ) {
  • form-maker/trunk/form-maker.php

    r3201732 r3229199  
    44 * Plugin URI: https://10web.io/plugins/wordpress-form-maker/?utm_source=form_maker&utm_medium=free_plugin
    55 * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
    6  * Version: 1.15.32
     6 * Version: 1.15.33
    77 * Author: 10Web Form Builder Team
    88 * Author URI: https://10web.io/plugins/?utm_source=form_maker&utm_medium=free_plugin
     
    2727  public $front_urls = array();
    2828  public $main_file = '';
    29   public $plugin_version = '1.15.32';
    30   public $db_version = '2.15.32';
     29  public $plugin_version = '1.15.33';
     30  public $db_version = '2.15.33';
    3131  public $menu_postfix = '_fm';
    3232  public $plugin_postfix = '';
  • form-maker/trunk/readme.txt

    r3201732 r3229199  
    44Requires at least: 4.6
    55Tested up to: 6.5
    6 Stable tag: 1.15.32
     6Stable tag: 1.15.33
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    558558
    559559== Changelog ==
     560= 1.15.33 =
     561* Fixed: Security issue fix.
     562
    560563= 1.15.32 =
    561564* Fixed: Security issue fix.
Note: See TracChangeset for help on using the changeset viewer.