Plugin Directory

Changeset 3371390


Ignore:
Timestamp:
10/01/2025 07:26:32 PM (6 months ago)
Author:
pasyuk
Message:

v1.24.0

  • Compatibility with latest WordPress versions
  • Fix vulnerability
  • Fix PHP warnings
Location:
grand-media/trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • grand-media/trunk

    • Property svn:ignore
      •  

        old new  
        33temp.php
        44.gitignore
         5current_state.md
  • grand-media/trunk/admin/ajax.php

    r2895405 r3371390  
    24272427    global $gmDB, $gmCore;
    24282428
     2429//  $nonce_valid = false;
     2430//  if ( isset( $_REQUEST['_ajax_nonce'] ) ) {
     2431//      $nonce_valid = (bool) check_ajax_referer( 'GmediaGallery', '_ajax_nonce', false );
     2432//  }
     2433//  if ( ! $nonce_valid && isset( $_REQUEST['nonce'] ) ) {
     2434//      $nonce_valid = (bool) check_ajax_referer( 'GmediaGallery', 'nonce', false );
     2435//  }
     2436//  if ( ! $nonce_valid ) {
     2437//      wp_send_json_error( array( 'code' => 'invalid_nonce' ), 403 );
     2438//  }
     2439
    24292440    $referer   = isset( $_SERVER['HTTP_REFERER'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_REFERER'] ) ) : '';
    24302441    $protocol  = isset( $_SERVER['SERVER_PROTOCOL'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_PROTOCOL'] ) ) : '';
     
    24632474    $gmRate = $gmCore->_post( 'rate' );
    24642475    if ( $gmRate ) {
    2465         /**
    2466          * @var $uip
    2467          * @var $gmid
    2468          * @var $rate
    2469          */
     2476        $gmRate = wp_parse_args( (array) $gmRate, array( 'uip' => '', 'gmid' => 0, 'rate' => 0 ) );
    24702477        extract( $gmRate, EXTR_OVERWRITE );
    24712478        if ( ! intval( $gmid ) || ( null === $gmDB->get_gmedia( $gmid ) ) ) {
     
    25372544    global $gmDB, $gmProcessor, $gmGallery, $gm_allowed_tags;
    25382545
     2546//  $nonce_valid = false;
     2547//  if ( isset( $_REQUEST['_ajax_nonce'] ) ) {
     2548//      $nonce_valid = (bool) check_ajax_referer( 'GmediaGallery', '_ajax_nonce', false );
     2549//  }
     2550//  if ( ! $nonce_valid && isset( $_REQUEST['nonce'] ) ) {
     2551//      $nonce_valid = (bool) check_ajax_referer( 'GmediaGallery', 'nonce', false );
     2552//  }
     2553//  if ( ! $nonce_valid ) {
     2554//      wp_send_json_error( array( 'code' => 'invalid_nonce' ), 403 );
     2555//  }
     2556
    25392557    /** @var $gmProcessorLibrary */
    25402558    include_once GMEDIA_ABSPATH . 'admin/processor/class.processor.library.php';
  • grand-media/trunk/admin/assets/js/gmedia.admin.js

    r2895405 r3371390  
    12981298                            if ( getData.length ) {
    12991299                                jQuery.get( ajaxurl,
    1300                                         {action: 'gmedia_get_data', gmedia__in: getData},
     1300                                        {
     1301                                            action: 'gmedia_get_data',
     1302                                            nonce: (window.GmediaGallery && GmediaGallery.nonce) ? GmediaGallery.nonce : '',
     1303                                            gmedia__in: getData
     1304                                        },
    13011305                                        function( data, textStatus, jqXHR ) {
    13021306                                            if ( jQuery.isArray( data ) && data.length ) {
  • grand-media/trunk/admin/processor/class.processor.library.php

    r2737116 r3371390  
    839839        $args['author__in']       = parent::filter_by_author( $gmCore->_get( 'author__in', $gmCore->_get( 'author' ) ) );
    840840        $args['alb']              = $gmCore->_get( 'alb' );
    841         $args['album__in']        = $gmCore->_get( 'album__in' );
    842         $args['album__not_in']    = $gmCore->_get( 'album__not_in' );
    843         $args['tag_id']           = $gmCore->_get( 'tag_id' );
    844         $args['tag__in']          = $gmCore->_get( 'tag__in' );
    845         $args['tag__and']         = $gmCore->_get( 'tag__and' );
    846         $args['tag__not_in']      = $gmCore->_get( 'tag__not_in' );
    847         $args['cat']              = $gmCore->_get( 'cat' );
    848         $args['category__in']     = $gmCore->_get( 'category__in' );
    849         $args['category__not_in'] = $gmCore->_get( 'category__not_in' );
    850         $args['category__and']    = $gmCore->_get( 'category__and' );
     841        $args['album__in']        = array_filter( array_map( 'intval', (array) $gmCore->_get( 'album__in' ) ) );
     842        $args['album__not_in']    = array_filter( array_map( 'intval', (array) $gmCore->_get( 'album__not_in' ) ) );
     843        $args['tag_id']           = (int) $gmCore->_get( 'tag_id' );
     844        $args['tag__in']          = array_filter( array_map( 'intval', (array) $gmCore->_get( 'tag__in' ) ) );
     845        $args['tag__and']         = array_filter( array_map( 'intval', (array) $gmCore->_get( 'tag__and' ) ) );
     846        $args['tag__not_in']      = array_filter( array_map( 'intval', (array) $gmCore->_get( 'tag__not_in' ) ) );
     847        $args['cat']              = (int) $gmCore->_get( 'cat' );
     848        $args['category__in']     = array_filter( array_map( 'intval', (array) $gmCore->_get( 'category__in' ) ) );
     849        $args['category__not_in'] = array_filter( array_map( 'intval', (array) $gmCore->_get( 'category__not_in' ) ) );
     850        $args['category__and']    = array_filter( array_map( 'intval', (array) $gmCore->_get( 'category__and' ) ) );
    851851        $args['gmedia__in']       = $gmCore->_get( 'gmedia__in' );
    852852        $args['s']                = $gmCore->_get( 's' );
  • grand-media/trunk/config.php

    r2280337 r3371390  
    1111define( 'GMEDIA_ABSPATH', plugin_dir_path( __FILE__ ) );
    1212
    13 define( 'GMEDIA_GALLERY_EMPTY', __( 'No Supported Files in Gallery', 'grand-media' ) );
     13define( 'GMEDIA_GALLERY_EMPTY', 'No Supported Files in Gallery' );
  • grand-media/trunk/grand-media.php

    r3060147 r3371390  
    44 * Plugin URI: http://wordpress.org/extend/plugins/grand-media/
    55 * Description: Gmedia Gallery - powerful media library plugin for creating beautiful galleries and managing files.
    6  * Version: 1.23.0
     6 * Version: 1.24.0
    77 * Author: Rattus
    88 * Author URI: https://codeasily.com/
     
    4040    class Gmedia {
    4141
    42         public $version       = '1.23.0';
     42        public $version       = '1.24.0';
    4343        public $dbversion     = '1.8.0';
    4444        public $minium_WP     = '5.3';
  • grand-media/trunk/inc/core.php

    r2895405 r3371390  
    417417        global $gmGallery;
    418418        if ( empty( $module_name ) ) {
     419            return false;
     420        }
     421
     422        if ( ! preg_match( '/^[A-Za-z0-9_-]+$/', $module_name ) ) {
    419423            return false;
    420424        }
  • grand-media/trunk/module

    • Property svn:ignore
      •  

        old new  
        7777phantom
        7878photomania
         79phantom-pro.zip
         80cubik-lite.zip
  • grand-media/trunk/module/jq-mplayer/index.php

    r2737116 r3371390  
    44    'name'         => 'jq-mplayer',
    55    'title'        => 'jQ Music Player',
    6     'version'      => '2.13',
     6    'version'      => '2.23',
    77    'author'       => 'CodEasily.com',
    88    'description'  => __( 'This beautiful audio player is totally written in JQuery and HTML5  + visitors can set rating for each track', 'grand-media' ),
  • grand-media/trunk/module/jq-mplayer/js/gm-music-player.js

    r1985348 r3371390  
    381381                var gmid = myPlaylist[index].id,
    382382                    uip = userOptions.ip;
    383                 $.post(options.ajaxurl, {action: 'gmedia_module_interaction', rate: {uip: uip, gmid: gmid, rate: rating}}, function (r) {
     383                $.post(options.ajaxurl, {action: 'gmedia_module_interaction', nonce: (GmediaGallery && GmediaGallery.nonce) ? GmediaGallery.nonce : '', rate: {uip: uip, gmid: gmid, rate: rating}}, function (r) {
    384384                    //console.log(r);
    385385                });
  • grand-media/trunk/readme.txt

    r3060147 r3371390  
    44Tags: best gallery plugin, gallery, image gallery, photo gallery, wordpress gallery plugin
    55Requires at least: 5.3.0
    6 Tested up to: 6.5
    7 Requires PHP: 5.4
    8 Stable tag: /trunk
     6Tested up to: 6.8
     7Requires PHP: 5.6
     8Stable tag: 1.24.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 Gmedia Gallery - photo gallery with comments, show EXIF & Metadata, gallery with map geolocation (GPS), private galleries, music player, video support.
     12Gmedia Gallery - photo gallery with comments, show EXIF & Metadata, gallery with map geolocation (GPS), private galleries.
    1313
    1414== Description ==
     
    140140* Go to Gmedia Modules page and update installed premium modules to latest versions
    141141
     142= v1.24.0 =
     143* Compatibility with latest WordPress versions
     144* Fix vulnerability
     145* Fix PHP warnings
     146
    142147= v1.23.0 =
    143148* Compatibility with latest WordPress versions
Note: See TracChangeset for help on using the changeset viewer.