Changeset 299860
- Timestamp:
- 11/24/2025 03:29:15 AM (3 hours ago)
- Location:
- onepress/2.3.16
- Files:
-
- 9 edited
- 1 copied
-
. (copied) (copied from onepress/2.3.15)
-
assets/css/customizer.css (modified) (1 diff)
-
assets/sass/style.scss (modified) (1 diff)
-
changelog.md (modified) (1 diff)
-
inc/admin/dashboard.php (modified) (5 diffs)
-
inc/customize-controls/control-repeater.php (modified) (3 diffs)
-
inc/customize-controls/section-plus.php (modified) (2 diffs)
-
inc/sanitize.php (modified) (1 diff)
-
inc/template-tags.php (modified) (2 diffs)
-
style.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
onepress/2.3.16/assets/css/customizer.css
r134546 r299860 2 2 li#accordion-panel-onepress_typo > .accordion-section-title 3 3 { 4 padding-left: 14px;4 /* padding-left: 14px; */ 5 5 } 6 6 -
onepress/2.3.16/assets/sass/style.scss
r289516 r299860 5 5 Author URI: http://www.famethemes.com 6 6 Description: 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.1 57 Version: 2.3.16 8 8 License: GNU General Public License v2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
onepress/2.3.16/changelog.md
r289516 r299860 1 1 # CHANGELOG 2 3 # 2.3.16 4 - FIXED: Fix security issues. 5 - FIXED: Alert copy text. 2 6 3 7 # 2.3.15 -
onepress/2.3.16/inc/admin/dashboard.php
r289516 r299860 180 180 </label> 181 181 <?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> 183 183 <?php } ?> 184 184 </div> … … 236 236 237 237 if (isset($_GET['onepress_action_dismiss'])) { 238 $key = sanitize_text_field($_GET['onepress_action_dismiss']); 238 239 $actions_dismiss = get_option('onepress_actions_dismiss'); 239 240 if (!is_array($actions_dismiss)) { 240 241 $actions_dismiss = array(); 241 242 } 242 $actions_dismiss[ sanitize_text_field($_GET['onepress_action_dismiss'])] = 'dismiss';243 $actions_dismiss[$key] = 'dismiss'; 243 244 update_option('onepress_actions_dismiss', $actions_dismiss); 244 245 } … … 352 353 <input type="submit" class="button button-secondary" value="<?php esc_attr_e('Copy now', 'onepress'); ?>"> 353 354 </p> 354 <?php if (isset($_GET['copied']) && $_GET['copied']== 1) { ?>355 <?php if (isset($_GET['copied']) && absint($_GET['copied']) == 1) { ?> 355 356 <p><?php esc_html_e('Your settings were copied.', 'onepress'); ?></p> 356 357 <?php } ?> … … 433 434 <?php do_action('onepress_more_required_details', $actions); ?> 434 435 <?php } else { ?> 435 <h3><?php e sc_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> 436 437 <p><?php esc_html_e('Hooray! There are no required actions for you right now.', 'onepress'); ?></p> 437 438 <?php } ?> … … 721 722 $('body').addClass('about-php'); 722 723 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 }); 729 730 }); 730 731 </script> -
onepress/2.3.16/inc/customize-controls/control-repeater.php
r239888 r299860 150 150 $this->json['value'] = $value; 151 151 $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; 153 168 154 169 } … … 230 245 <# if ( field.type !== 'checkbox' ) { #> 231 246 <# if ( field.title ) { #> 232 <label class="field-label">{{ field.title}}</label>247 <label class="field-label">{{{ field.title }}}</label> 233 248 <# } #> 234 249 … … 249 264 <label class="checkbox-label"> 250 265 <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> 252 267 <# } #> 253 268 254 269 <# if ( field.desc ) { #> 255 <p class="field-desc description">{{ field.desc}}</p>270 <p class="field-desc description">{{{ field.desc }}}</p> 256 271 <# } #> 257 272 -
onepress/2.3.16/inc/customize-controls/section-plus.php
r239888 r299860 49 49 $json = parent::json(); 50 50 $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); 53 53 return $json; 54 54 } … … 64 64 <li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }} cannot-expand"> 65 65 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> 67 67 </li> 68 68 <?php } -
onepress/2.3.16/inc/sanitize.php
r239888 r299860 134 134 $data[$i][$id] = sanitize_text_field($value); 135 135 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'] = ''; 150 161 } else { 151 $data[$i][$id]['id'] = '';162 $data[$i][$id]['id'] = $value['id']; 152 163 } 153 154 break; 164 } 165 166 break; 155 167 default: 156 168 $data[$i][$id] = wp_kses_post($value); -
onepress/2.3.16/inc/template-tags.php
r289516 r299860 130 130 $classes['title'] = 'has-title'; 131 131 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>'; 133 133 } 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>'; 135 135 } 136 136 } … … 140 140 if ($description || is_customize_preview()) { 141 141 $classes['desc'] = 'has-desc'; 142 $html .= '<p class="site-description">' . $description. '</p>';142 $html .= '<p class="site-description">' . esc_html($description) . '</p>'; 143 143 } 144 144 } else { -
onepress/2.3.16/style.css
r289516 r299860 5 5 Author URI: http://www.famethemes.com 6 6 Description: 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.1 57 Version: 2.3.16 8 8 License: GNU General Public License v2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.