Plugin Directory

Changeset 3371681


Ignore:
Timestamp:
10/02/2025 09:44:45 AM (6 months ago)
Author:
petredobrescu
Message:

Version 4.1.7

  • Fix: A potential "Cross-Site Scripting" vulnerability has been patched, responsibly disclosed by the WordFence team;
  • Fix: Corrected a few text typos.
Location:
enable-media-replace
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • enable-media-replace/tags/4.1.7/classes/ViewController.php

    r2903341 r3371681  
    115115                    break;
    116116                    case self::ERROR_DIRECTORY_SECURITY:
    117                         $message = __('Specificed directory is outside the upload directory. This is not allowed for security reasons', 'enable-media-replace');
     117                        $message = __('Specified directory is outside the upload directory. This is not allowed for security reasons', 'enable-media-replace');
    118118                        $path = isset($errorData['path']) ? $errorData['path'] : false;
    119119                        $basedir = isset($errorData['basedir']) ? $errorData['basedir'] : false;
     
    125125                    break;
    126126                    case self::ERROR_DIRECTORY_NOTEXIST:
    127                         $message = __('Specificed new directory does not exist. Path must be a relative path from the upload directory and exist', 'enable-media-replace');
     127                        $message = __('Specified new directory does not exist. Path must be a relative path from the upload directory and exist', 'enable-media-replace');
    128128                    break;
    129129
  • enable-media-replace/tags/4.1.7/classes/emr-plugin.php

    r3010103 r3371681  
    643643   * @todo Note this returns the wrong date, ie. server date not corrected for timezone. Function could be removed altogether, not sure about purpose.
    644644   */
    645     public function get_modified_date($atts)
    646     {
    647         $id=0;
    648         $format= '';
    649 
    650         extract(shortcode_atts(array(
    651         'id' => '',
    652         'format' => get_option('date_format') . " " . get_option('time_format'),
    653         ), $atts));
    654 
    655         if ($id == '') {
    656             return false;
    657         }
    658 
     645    public function get_modified_date($args)
     646    {
     647
     648        $id = isset($args['id']) ? intval($args['id']) : false;
     649        $format = isset($args['format']) ? sanitize_text_field($args['format']) : false;
     650
     651        if (false === $id)
     652        {
     653          return false;
     654        }
     655 
    659656        // Get path to file
    660657        $current_file = get_attached_file($id);
     
    667664        $filetime = filemtime($current_file);
    668665
     666        if (false === $format)
     667        {
     668          $format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
     669        }
     670
    669671        if (false !== $filetime) {
    670672            // do date conversion
    671             return date($format, $filetime);
     673            return wp_date($format, $filetime);
    672674        }
    673675
  • enable-media-replace/tags/4.1.7/enable-media-replace.php

    r3363829 r3371681  
    22/**
    33 * Plugin Name: Enable Media Replace
    4  * Plugin URI: https://shortpixel.com
     4 * Plugin URI: https://wordpress.org/plugins/enable-media-replace/
    55 * Description: Enable replacing media files by uploading a new file in the "Edit Media" section of the WordPress Media Library.
    6  * Version: 4.1.6
     6 * Version: 4.1.7
    77 * Author: ShortPixel
    88 * Author URI: https://shortpixel.com
     
    2626 */
    2727
    28 define( 'EMR_VERSION', '4.1.6' );
     28define( 'EMR_VERSION', '4.1.7' );
    2929
    3030if ( ! defined( 'ABSPATH' ) ) {
  • enable-media-replace/tags/4.1.7/readme.txt

    r3261237 r3371681  
    66Tested up to: 6.8
    77Requires PHP: 5.6
    8 Stable tag: 4.1.6
     8Stable tag: 4.1.7
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8080
    8181== Changelog ==
     82
     83= 4.1.7 =
     84
     85Release date: October 2, 2025
     86* Fix: A potential "Cross-Site Scripting" vulnerability has been patched, responsibly disclosed by the WordFence team;
     87* Fix: Corrected a few text typos.
    8288
    8389= 4.1.6 =
  • enable-media-replace/trunk/classes/ViewController.php

    r2903341 r3371681  
    115115                    break;
    116116                    case self::ERROR_DIRECTORY_SECURITY:
    117                         $message = __('Specificed directory is outside the upload directory. This is not allowed for security reasons', 'enable-media-replace');
     117                        $message = __('Specified directory is outside the upload directory. This is not allowed for security reasons', 'enable-media-replace');
    118118                        $path = isset($errorData['path']) ? $errorData['path'] : false;
    119119                        $basedir = isset($errorData['basedir']) ? $errorData['basedir'] : false;
     
    125125                    break;
    126126                    case self::ERROR_DIRECTORY_NOTEXIST:
    127                         $message = __('Specificed new directory does not exist. Path must be a relative path from the upload directory and exist', 'enable-media-replace');
     127                        $message = __('Specified new directory does not exist. Path must be a relative path from the upload directory and exist', 'enable-media-replace');
    128128                    break;
    129129
  • enable-media-replace/trunk/classes/emr-plugin.php

    r3010103 r3371681  
    643643   * @todo Note this returns the wrong date, ie. server date not corrected for timezone. Function could be removed altogether, not sure about purpose.
    644644   */
    645     public function get_modified_date($atts)
    646     {
    647         $id=0;
    648         $format= '';
    649 
    650         extract(shortcode_atts(array(
    651         'id' => '',
    652         'format' => get_option('date_format') . " " . get_option('time_format'),
    653         ), $atts));
    654 
    655         if ($id == '') {
    656             return false;
    657         }
    658 
     645    public function get_modified_date($args)
     646    {
     647
     648        $id = isset($args['id']) ? intval($args['id']) : false;
     649        $format = isset($args['format']) ? sanitize_text_field($args['format']) : false;
     650
     651        if (false === $id)
     652        {
     653          return false;
     654        }
     655 
    659656        // Get path to file
    660657        $current_file = get_attached_file($id);
     
    667664        $filetime = filemtime($current_file);
    668665
     666        if (false === $format)
     667        {
     668          $format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
     669        }
     670
    669671        if (false !== $filetime) {
    670672            // do date conversion
    671             return date($format, $filetime);
     673            return wp_date($format, $filetime);
    672674        }
    673675
  • enable-media-replace/trunk/enable-media-replace.php

    r3363829 r3371681  
    22/**
    33 * Plugin Name: Enable Media Replace
    4  * Plugin URI: https://shortpixel.com
     4 * Plugin URI: https://wordpress.org/plugins/enable-media-replace/
    55 * Description: Enable replacing media files by uploading a new file in the "Edit Media" section of the WordPress Media Library.
    6  * Version: 4.1.6
     6 * Version: 4.1.7
    77 * Author: ShortPixel
    88 * Author URI: https://shortpixel.com
     
    2626 */
    2727
    28 define( 'EMR_VERSION', '4.1.6' );
     28define( 'EMR_VERSION', '4.1.7' );
    2929
    3030if ( ! defined( 'ABSPATH' ) ) {
  • enable-media-replace/trunk/readme.txt

    r3261237 r3371681  
    66Tested up to: 6.8
    77Requires PHP: 5.6
    8 Stable tag: 4.1.6
     8Stable tag: 4.1.7
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8080
    8181== Changelog ==
     82
     83= 4.1.7 =
     84
     85Release date: October 2, 2025
     86* Fix: A potential "Cross-Site Scripting" vulnerability has been patched, responsibly disclosed by the WordFence team;
     87* Fix: Corrected a few text typos.
    8288
    8389= 4.1.6 =
Note: See TracChangeset for help on using the changeset viewer.