Make WordPress Themes

Changeset 299860


Ignore:
Timestamp:
11/24/2025 03:29:15 AM (3 hours ago)
Author:
themedropbox
Message:

New version of OnePress - 2.3.16

Location:
onepress/2.3.16
Files:
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • onepress/2.3.16/assets/css/customizer.css

    r134546 r299860  
    22li#accordion-panel-onepress_typo > .accordion-section-title
    33{
    4     padding-left: 14px;
     4    /* padding-left: 14px; */
    55}
    66
  • onepress/2.3.16/assets/sass/style.scss

    r289516 r299860  
    55Author URI: http://www.famethemes.com
    66Description: OnePress is an outstanding creative and flexible WordPress one page theme well suited for business website, portfolio, digital agency, product showcase, freelancers and everyone else who appreciate good design. The theme overall is an elegant and classic one, a fine example of Bootstrap 4 WordPress theme which compatibility with latest version of WooCommerce. (Live preview : https://demos.famethemes.com/onepress)
    7 Version: 2.3.15
     7Version: 2.3.16
    88License: GNU General Public License v2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • onepress/2.3.16/changelog.md

    r289516 r299860  
    11# CHANGELOG
     2
     3# 2.3.16
     4- FIXED: Fix security issues.
     5- FIXED: Alert copy text.
    26
    37# 2.3.15
  • onepress/2.3.16/inc/admin/dashboard.php

    r289516 r299860  
    180180                    </label>
    181181                    <?php if ($see_only) { ?>
    182                         <span class="note-bubble"><?php esc_html('Plus Feature', 'onepress'); ?></span>
     182                        <span class="note-bubble"><?php esc_html_e('Plus Feature', 'onepress'); ?></span>
    183183                    <?php } ?>
    184184                </div>
     
    236236
    237237        if (isset($_GET['onepress_action_dismiss'])) {
     238            $key = sanitize_text_field($_GET['onepress_action_dismiss']);
    238239            $actions_dismiss =  get_option('onepress_actions_dismiss');
    239240            if (!is_array($actions_dismiss)) {
    240241                $actions_dismiss = array();
    241242            }
    242             $actions_dismiss[sanitize_text_field($_GET['onepress_action_dismiss'])] = 'dismiss';
     243            $actions_dismiss[$key] = 'dismiss';
    243244            update_option('onepress_actions_dismiss', $actions_dismiss);
    244245        }
     
    352353                                <input type="submit" class="button button-secondary" value="<?php esc_attr_e('Copy now', 'onepress'); ?>">
    353354                            </p>
    354                             <?php if (isset($_GET['copied']) && $_GET['copied'] == 1) { ?>
     355                            <?php if (isset($_GET['copied']) && absint($_GET['copied']) == 1) { ?>
    355356                                <p><?php esc_html_e('Your settings were copied.', 'onepress'); ?></p>
    356357                            <?php } ?>
     
    433434                        <?php do_action('onepress_more_required_details', $actions); ?>
    434435                    <?php  } else { ?>
    435                         <h3><?php esc_html(sprintf(__('Keep %s updated', 'onepress'), $theme_data->Name)); ?></h3>
     436                        <h3><?php echo esc_html(sprintf(__('Keep %s updated', 'onepress'), $theme_data->Name)); ?></h3>
    436437                        <p><?php esc_html_e('Hooray! There are no required actions for you right now.', 'onepress'); ?></p>
    437438                    <?php } ?>
     
    721722                $('body').addClass('about-php');
    722723
    723                 $('.copy-settings-form').on('submit', function() {
    724                     var c = confirm('<?php echo esc_attr_e('Are you sure want to copy ?', 'onepress'); ?>');
    725                     if (!c) {
    726                         return false;
    727                     }
    728                 });
     724            $('.copy-settings-form').on('submit', function() {
     725                var c = confirm(<?php echo wp_json_encode(__('Are you sure you want to copy?', 'onepress')); ?>);
     726                if (!c) {
     727                    return false;
     728                }
     729            });
    729730            });
    730731        </script>
  • onepress/2.3.16/inc/customize-controls/control-repeater.php

    r239888 r299860  
    150150        $this->json['value']         = $value;
    151151        $this->json['id_key']        = $this->id_key;
    152         $this->json['fields']        = $this->fields;
     152       
     153        // Sanitize fields data before passing to JavaScript
     154        $sanitized_fields = array();
     155        foreach ($this->fields as $key => $field) {
     156            $sanitized_fields[$key] = $field;
     157            if (isset($field['title'])) {
     158                // Allow safe HTML tags in title (like <strong>, <em>, etc.)
     159                $sanitized_fields[$key]['title'] = wp_kses_post($field['title']);
     160            }
     161            if (isset($field['desc'])) {
     162                // Allow safe HTML tags in description (like <strong>, <em>, <a>, <p>, etc.)
     163                // wp_kses_post() removes dangerous tags like <script>, <iframe> while keeping safe ones
     164                $sanitized_fields[$key]['desc'] = wp_kses_post($field['desc']);
     165            }
     166        }
     167        $this->json['fields'] = $sanitized_fields;
    153168
    154169    }
     
    230245                                    <# if ( field.type !== 'checkbox' ) { #>
    231246                                    <# if ( field.title ) { #>
    232                                     <label class="field-label">{{ field.title }}</label>
     247                                    <label class="field-label">{{{ field.title }}}</label>
    233248                                    <# } #>
    234249
     
    249264                                    <label class="checkbox-label">
    250265                                        <input data-live-id="{{ field.id }}" type="checkbox" <# if ( field.value ) { #> checked="checked" <# } #> value="1" data-repeat-name="_items[__i__][{{ field.id }}]" class="">
    251                                         {{ field.title }}</label>
     266                                        {{{ field.title }}}</label>
    252267                                    <# } #>
    253268
    254269                                    <# if ( field.desc ) { #>
    255                                     <p class="field-desc description">{{ field.desc }}</p>
     270                                    <p class="field-desc description">{{{ field.desc }}}</p>
    256271                                    <# } #>
    257272
  • onepress/2.3.16/inc/customize-controls/section-plus.php

    r239888 r299860  
    4949        $json = parent::json();
    5050        $json['plus_text'] = $this->plus_text;
    51         $json['plus_url']  = $this->plus_url;
    52         $json['id'] = $this->id;
     51        $json['plus_url']  = esc_url($this->plus_url);
     52        $json['id'] = sanitize_text_field($this->id);
    5353        return $json;
    5454    }
     
    6464        <li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }} cannot-expand">
    6565
    66             <h3><a href="{{ data.plus_url }}" target="_blank">{{{ data.plus_text }}}</a></h3>
     66            <h3><a href="{{ data.plus_url }}" target="_blank" rel="noopener noreferrer">{{ data.plus_text }}</a></h3>
    6767        </li>
    6868    <?php }
  • onepress/2.3.16/inc/sanitize.php

    r239888 r299860  
    134134                        $data[$i][$id] = sanitize_text_field($value);
    135135                        break;
    136                     case 'media':
    137                         $value = wp_parse_args(
    138                             $value,
    139                             array(
    140                                 'url' => '',
    141                                 'id' => false,
    142                             )
    143                         );
    144                         $value['id'] = absint($value['id']);
    145                         $data[$i][$id]['url'] = sanitize_text_field($value['url']);
    146 
    147                         if ($url = wp_get_attachment_url($value['id'])) {
    148                             $data[$i][$id]['id']   = $value['id'];
    149                             $data[$i][$id]['url']  = $url;
     136                case 'media':
     137                    $value = wp_parse_args(
     138                        $value,
     139                        array(
     140                            'url' => '',
     141                            'id' => false,
     142                        )
     143                    );
     144                    $value['id'] = absint($value['id']);
     145                   
     146                    // Validate and sanitize URL
     147                    $url = sanitize_text_field($value['url']);
     148                    // Only allow http/https URLs for security
     149                    if (!empty($url) && !preg_match('/^https?:\/\//', $url)) {
     150                        $url = '';
     151                    }
     152                    $url = esc_url_raw($url);
     153                    $data[$i][$id]['url'] = $url;
     154
     155                    if ($url && $value['id'] && ($attachment_url = wp_get_attachment_url($value['id']))) {
     156                        $data[$i][$id]['id']   = $value['id'];
     157                        $data[$i][$id]['url']  = esc_url_raw($attachment_url);
     158                    } else {
     159                        if (empty($url)) {
     160                            $data[$i][$id]['id'] = '';
    150161                        } else {
    151                             $data[$i][$id]['id'] = '';
     162                            $data[$i][$id]['id'] = $value['id'];
    152163                        }
    153 
    154                         break;
     164                    }
     165
     166                    break;
    155167                    default:
    156168                        $data[$i][$id] = wp_kses_post($value);
  • onepress/2.3.16/inc/template-tags.php

    r289516 r299860  
    130130            $classes['title'] = 'has-title';
    131131            if (is_front_page() && ! is_home()) {
    132                 $html .= '<h1 class="site-title"><a class="site-text-logo" href="' . esc_url(home_url('/')) . '" rel="home">' . get_bloginfo('name') . '</a></h1>';
     132                $html .= '<h1 class="site-title"><a class="site-text-logo" href="' . esc_url(home_url('/')) . '" rel="home">' . esc_html(get_bloginfo('name')) . '</a></h1>';
    133133            } else {
    134                 $html .= '<p class="site-title"><a class="site-text-logo" href="' . esc_url(home_url('/')) . '" rel="home">' . get_bloginfo('name') . '</a></p>';
     134                $html .= '<p class="site-title"><a class="site-text-logo" href="' . esc_url(home_url('/')) . '" rel="home">' . esc_html(get_bloginfo('name')) . '</a></p>';
    135135            }
    136136        }
     
    140140            if ($description || is_customize_preview()) {
    141141                $classes['desc'] = 'has-desc';
    142                 $html .= '<p class="site-description">' . $description . '</p>';
     142                $html .= '<p class="site-description">' . esc_html($description) . '</p>';
    143143            }
    144144        } else {
  • onepress/2.3.16/style.css

    r289516 r299860  
    55Author URI: http://www.famethemes.com
    66Description: OnePress is an outstanding creative and flexible WordPress one page theme well suited for business website, portfolio, digital agency, product showcase, freelancers and everyone else who appreciate good design. The theme overall is an elegant and classic one, a fine example of Bootstrap 4 WordPress theme which compatibility with latest version of WooCommerce. (Live preview : https://demos.famethemes.com/onepress)
    7 Version: 2.3.15
     7Version: 2.3.16
    88License: GNU General Public License v2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.