Changeset 3418891
- Timestamp:
- 12/13/2025 12:12:22 PM (3 months ago)
- Location:
- category-icon/trunk
- Files:
-
- 2 edited
-
category-icon.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
category-icon/trunk/category-icon.php
r3296463 r3418891 4 4 * Plugin URI: http://pixelgrade.com 5 5 * Description: Easily attach an icon and/or an image to a category, tag or any other taxonomy term. 6 * Version: 1.0. 26 * Version: 1.0.3 7 7 * Author: Pixelgrade 8 8 * Author URI: http://pixelgrade.com … … 31 31 protected $plugin_baseurl = null; 32 32 protected $plugin_screen_hook_suffix = null; 33 protected $version = '1.0. 2';33 protected $version = '1.0.3'; 34 34 protected $plugin_slug = 'category-icon'; 35 35 protected $plugin_key = 'category-icon'; … … 299 299 <td> 300 300 <div class="open_term_icon_preview"> 301 <input type="hidden" name="term_icon_value" id="term_icon_value" value="<?php echo $current_value; ?>">301 <input type="hidden" name="term_icon_value" id="term_icon_value" value="<?php echo esc_attr( $current_value ); ?>"> 302 302 <?php if ( empty( $current_value ) ) { ?> 303 303 <span class="open_term_icon_upload button button-secondary"> … … 327 327 <td> 328 328 <div class="open_term_image_preview"> 329 <input type="hidden" name="term_image_value" id="term_image_value" value="<?php echo $current_image_value; ?>">329 <input type="hidden" name="term_image_value" id="term_image_value" value="<?php echo esc_attr( $current_image_value ); ?>"> 330 330 <?php if ( empty( $current_image_value ) ) { ?> 331 331 <span class="open_term_image_upload button button-secondary"> … … 350 350 function save_taxonomy_custom_meta ( $term_id ) { 351 351 if ( isset( $_POST['term_icon_value'] ) ) { 352 $value = $_POST['term_icon_value']; 352 $value = absint( wp_unslash( $_POST['term_icon_value'] ) ); 353 if ( $value <= 0 ) { 354 $value = ''; 355 } 353 356 $current_value = get_term_meta( $term_id, 'pix_term_icon', true ); 354 357 … … 362 365 363 366 if ( isset( $_POST['term_image_value'] ) ) { 364 $value_image = $_POST['term_image_value']; 367 $value_image = absint( wp_unslash( $_POST['term_image_value'] ) ); 368 if ( $value_image <= 0 ) { 369 $value_image = ''; 370 } 365 371 $current_value_image = get_term_meta( $term_id, 'pix_term_image', true ); 366 372 -
category-icon/trunk/readme.txt
r3296463 r3418891 5 5 Tested up to: 6.8.1 6 6 Requires PHP: 5.6.40 7 Stable tag: 1.0. 27 Stable tag: 1.0.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 26 26 27 27 == Changelog == 28 29 = 1.0.3 = 30 * Security: sanitize and strictly validate term icon / image IDs on save and escape them on output to prevent XSS via the `term_icon_value` and `term_image_value` fields, even for Editor-level users. 28 31 29 32 = 1.0.2 =
Note: See TracChangeset
for help on using the changeset viewer.