Plugin Directory

Changeset 2980695


Ignore:
Timestamp:
10/18/2023 01:50:03 PM (2 years ago)
Author:
prismtechstudios
Message:

1.4.17 - fix security vulnerability where WordPress users with editor role could access an XSS vulnerability

Location:
modern-footnotes
Files:
16 added
2 edited

Legend:

Unmodified
Added
Removed
  • modern-footnotes/trunk/modern-footnotes.php

    r2879914 r2980695  
    55Text Domain: modern-footnotes
    66Description: Add inline footnotes to your post via the footnote icon on the toolbar for editing posts and pages. Or, use the [mfn] or [modern_footnote] shortcodes [mfn]like this[/mfn].
    7 Version:     1.4.16
     7Version:     1.4.17
    88Author:      Prism Tech Studios
    99Author URI:  http://prismtechstudios.com/
     
    1515defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
    1616
    17 $modern_footnotes_version = '1.4.16';
     17$modern_footnotes_version = '1.4.17';
    1818
    1919$modern_footnotes_options = get_option('modern_footnotes_settings');
     
    140140  // If additional space-seperated classes are provided to an individual footnote using [mfn class="some-class"], they are added to the footnote
    141141  if (isset($atts['class'])) {
    142     $additional_classes .= $atts['class'].' ';
     142    $additional_classes .= esc_attr($atts['class']).' ';
    143143  }
    144144 
     
    166166    if (isset($atts['referencenumber'])) {
    167167        $display_number = $atts['referencenumber'];
    168         $additional_attributes = 'refnum="' . $display_number . '"';
     168        $additional_attributes = 'refnum="' . esc_attr($display_number) . '"';
    169169    } else if (!isset($modern_footnotes_all_posts_data[$scope_id]) || count($modern_footnotes_all_posts_data[$scope_id]['used_reference_numbers']) == 0) {
    170170        $display_number = 1;
     
    199199
    200200  //create a unique ID to use in HTML
    201   $content_id = "mfn-content-" . $scope_id . '-' . preg_replace('/[^a-zA-Z0-9-_]/i', '', $display_number);
     201  $content_id = "mfn-content-" . $scope_id . '-' . preg_replace('/[^a-zA-Z0-9-_]/i', '', esc_attr($display_number));
    202202
    203203  if (isset($atts['for_rss_feed']) && $atts['for_rss_feed']) {
    204     $content = '<sup class="modern-footnotes-footnote ' . $additional_classes . '">' . $display_number . '</sup>'; // only display the superscript for RSS feeds
     204    $content = '<sup class="modern-footnotes-footnote ' . $additional_classes . '">' . esc_html($display_number) . '</sup>'; // only display the superscript for RSS feeds
    205205  } else {
    206     $content = '<sup class="modern-footnotes-footnote ' . $additional_classes . '" data-mfn="' . str_replace('"',"\\\"", $display_number) . '" data-mfn-post-scope="' . $scope_id . '">' .
     206    $content = '<sup class="modern-footnotes-footnote ' . $additional_classes . '" data-mfn="' . str_replace('"',"\\\"", esc_attr($display_number)) . '" data-mfn-post-scope="' . $scope_id . '">' .
    207207                  '<a href="javascript:void(0)" ' . $additional_attributes . ' role="button" aria-pressed="false" aria-describedby="' . $content_id . '">' . $display_number . '</a>' .
    208208                '</sup>' .
  • modern-footnotes/trunk/readme.txt

    r2889657 r2980695  
    33Tags: footnotes, citations, inline footnotes, inline citations, mobile-friendly citations, mobile-friendly footnotes
    44Requires at least: 4.6
    5 Tested up to: 6.2
    6 Stable tag: 1.4.16
     5Tested up to: 6.3.2
     6Stable tag: 1.4.17
    77License: GNU General Public License v2
    88License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
     
    8484== Changelog ==
    8585
     86= 1.4.17 =
     87* Security fix for XSS issue. Thanks to cleantalk and Dmitrii Ignatyev for identifying the issue.
     88
    8689= 1.4.16 =
    8790* Security fix for XSS issue. Thanks to Rio Darmawan for identifying the issue.
Note: See TracChangeset for help on using the changeset viewer.