Plugin Directory

Changeset 2852737


Ignore:
Timestamp:
01/23/2023 07:22:44 AM (3 years ago)
Author:
real.master
Message:

XSS fixed

Location:
real-kit/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • real-kit/trunk/mod/modals/index.php

    r2832256 r2852737  
    2121}
    2222
    23 // Если мобудь НЕ выключен
     23// Если модудь НЕ выключен
    2424if (get_option('realkit_modals_toggle') != 'off') {
    2525
     
    153153        ), $args);
    154154
    155         $modal = get_post($args['open']);
     155        $modal = get_posts(array(
     156            'post_type' => REALKIT_MODALS_POST_TYPE,
     157            'post__in'  => [intval($args['open'])],
     158        ));
    156159
    157160        if (empty($modal)) return;
    158161
    159162        // Запомнить
    160         Realkit_modals::$list[] = $modal;
    161 
    162         $id      = (empty($args['id']))    ? '' : ' id="'    . $args['id']    . '"';
    163         $class   = (empty($args['class'])) ? '' : ' ' . $args['class'];
    164         $target  = ' realkit_modal_target="#realkit_modal_' . $args['open'] . '"';
     163        Realkit_modals::$list[] = $modal[0];
     164
     165        $id      = (empty($args['id']))    ? '' : ' id="' . sanitize_html_class($args['id'])    . '"';
     166        $class   = (empty($args['class'])) ? '' : ' ' . sanitize_html_class($args['class']);
     167        $target  = ' realkit_modal_target="#realkit_modal_' . intval($args['open']) . '"';
    165168        $content = str_replace(array('<p>', '</p>'), '', $content);
    166169
     
    171174    });
    172175
    173     // Вывесть модальные окна в конце страницы
     176    // Вывести модальные окна в конце страницы
    174177    add_action('wp_footer', function() {
    175178
  • real-kit/trunk/readme.txt

    r2832256 r2852737  
    11=== real.Kit ===
    22
    3 Stable tag:        5.1.0
    4 Requires at least: 5.1.1
     3Stable tag:        5.1.1
     4Requires at least: 6.1.1
    55Tested up to:      6.1
    66Requires PHP:      5.6
     
    9090== Changelog ==
    9191
     92= 5.1.1 =
     93
     94* Исправлена XSS уязвимость шорткода открытия модальных окон.
     95
     96*Machine translation:*
     97
     98* Fixed XSS vulnerability of the modal window opening shortcode.
     99
    92100= 5.1.0 =
    93101
  • real-kit/trunk/real-kit.php

    r2832547 r2852737  
    22/*
    33Plugin Name: real.Kit
    4 Version:     5.1.0
     4Version:     5.1.1
    55Author:      realMaster
    66Text Domain: realkit
Note: See TracChangeset for help on using the changeset viewer.