Plugin Directory

Changeset 3191703


Ignore:
Timestamp:
11/19/2024 12:20:57 AM (15 months ago)
Author:
Bluenotes
Message:

1.2.2 Nov 18, 2024

  • Security fix for XSS via the shortcode image ID's attribute. My thanks to Peter Thaleikis for the discovery.
  • Note that this is a legacy plugin. Users should move towards the built in block editor gallery features.
Location:
bne-gallery-extended/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bne-gallery-extended/trunk/bne-gallery-extended.php

    r2737188 r3191703  
    22/*
    33 * Plugin Name: BNE Gallery Extended
    4  * Version: 1.2.1
     4 * Version: 1.2.2
    55 * Description:  Adds a new shortcode attribute, "display" to the WP [gallery] shortcode allowing to display the gallery as a 3D carousel or masonry grid.
    66 * Author: Kerry Kline
     
    9292         * 
    9393         *  @since      v1.0
    94          *  @updated    v1.2.1
     94         *  @updated    v1.2.2
    9595         *
    9696        */
     
    169169       
    170170                            // Grabs the image ID's in the [gallery] shortcode
    171                             $image_ids = explode( ',', $atts['ids'] );
     171                            $image_ids = explode( ',', esc_attr( $atts['ids'] ) );
    172172                           
    173173                            // Check if orderby is set to "rand", if so shuffle the stack
     
    300300                   
    301301                    // Grabs the image ID's in the [gallery] shortcode
    302                     $image_ids = explode( ',', $atts['ids'] );
    303    
     302                    $image_ids = explode( ',', esc_attr( $atts['ids'] ) );
     303                   
    304304                    // Check if orderby is set to "rand", if so shuffle the stack
    305305                    if( $atts['orderby'] == 'rand' ) { shuffle( $image_ids ); }
     
    309309                    foreach( $image_ids as $id ) {
    310310                        $output .= '<div class="gallery-single gallery-item image-id-'.$id.' col-'.$atts['columns'].'-masonry" style="margin-bottom: '.$atts['gutter'].'px; width: '.$grid_col_width.';">';
     311                           
     312                            /*
     313                            LOOK AT NOT OUTPUTING THE IMAGE TWICE FOR CAPTIONS
     314                            MAKE SURE LINK WORKS ON HOVER
     315                            */
     316                           
    311317                           
    312318                            // Link: File
  • bne-gallery-extended/trunk/readme.txt

    r2737188 r3191703  
    33Tags: WordPress gallery, gallery, masonry gallery, carousel gallery
    44Requires at least: 5.0
    5 Tested up to: 6.0
    6 Stable tag: 1.2.1
     5Tested up to: 6.7
     6Stable tag: 1.2.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8383== Changelog ==
    8484
     85= 1.2.2 Nov 18, 2024 =
     86* Security fix for XSS via the shortcode image ID's attribute. My thanks to Peter Thaleikis for the discovery.
     87* Note that this is a legacy plugin. Users should move towards the built in block editor gallery features.
     88
     89
    8590= 1.2.1 June 3, 20222 =
    8691* Fix PHP 8.0 warning.
Note: See TracChangeset for help on using the changeset viewer.