Plugin Directory

Changeset 2701591


Ignore:
Timestamp:
03/30/2022 01:13:44 AM (4 years ago)
Author:
upcasted
Message:

Security fix, Plugin rename and path fix for some users.

Location:
upcasted-s3-offload/trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • upcasted-s3-offload/trunk/README.txt

    r2665190 r2701591  
    11=== AWS S3 for WordPress Plugin - Upcasted ===
    22Contributors: upcasted
    3 Tags: aws s3, s3, aws, amazon s3, media gallery
     3Tags: aws s3, s3, minio, amazon s3, digital ocean spaces
    44Plugin URI: https://upcasted.com/upcasted-s3-offload
    55Author URI: https://upcasted.com/
    66Requires at least: 4.9
    7 Tested up to: 5.9
     7Tested up to: 5.9.2
    88Requires PHP: 7.0
    99Stable tag: trunk
     
    149149
    150150== Changelog ==
     151= 3.0.1 =
     152* Upgraded: AWS SDK, Guzzle & more
     153* Security fix
     154* Fix: Image path was wrong for certain users
     155
    151156= 3.0.0 =
    152157* Upgraded: minimum PHP version to 7.0
  • upcasted-s3-offload/trunk/admin/providers/AmazonCloudManipulator.php

    r2665190 r2701591  
    135135    {
    136136        $settings = get_option(UPCASTED_S3_OFFLOAD_SETTINGS);
     137        if (isset($settings[UPCASTED_S3_OFFLOAD_PROTOCOL], $settings[UPCASTED_S3_OFFLOAD_CUSTOM_DOMAIN])) {
     138            return $settings[UPCASTED_S3_OFFLOAD_PROTOCOL] . $settings[UPCASTED_S3_OFFLOAD_CUSTOM_DOMAIN];
     139        }
    137140        if (!empty($settings[UPCASTED_CUSTOM_ENDPOINT])) {
    138141            return "https://{$settings[UPCASTED_S3_OFFLOAD_BUCKET]}.{$settings[UPCASTED_CUSTOM_ENDPOINT]}";
    139142        }
    140         if (isset($settings[UPCASTED_S3_OFFLOAD_PROTOCOL], $settings[UPCASTED_S3_OFFLOAD_CUSTOM_DOMAIN])) {
    141             return $settings[UPCASTED_S3_OFFLOAD_PROTOCOL] . $settings[UPCASTED_S3_OFFLOAD_CUSTOM_DOMAIN];
     143        if (!empty($settings[UPCASTED_OFFLOAD_REGION])) {
     144            return "https://{$settings[UPCASTED_S3_OFFLOAD_BUCKET]}.s3.{$settings[UPCASTED_OFFLOAD_REGION]}.amazonaws.com";
    142145        }
    143146
  • upcasted-s3-offload/trunk/freemius/includes/class-freemius.php

    r2508088 r2701591  
    35513551         */
    35523552        static function _toggle_debug_mode() {
     3553            check_admin_referer( 'fs_toggle_debug_mode' );
     3554
    35533555            if ( ! is_super_admin() ) {
    35543556                return;
     
    35723574         */
    35733575        static function _get_debug_log() {
     3576            check_admin_referer( 'fs_get_debug_log' );
     3577
     3578            if ( ! is_super_admin() ) {
     3579                return;
     3580            }
     3581
     3582            $limit  = min( ! empty( $_POST['limit'] ) ? absint( $_POST['limit'] ) : 200, 200 );
     3583            $offset = min( ! empty( $_POST['offset'] ) ? absint( $_POST['offset'] ) : 200, 200 );
     3584
    35743585            $logs = FS_Logger::load_db_logs(
    35753586                fs_request_get( 'filters', false, 'post' ),
    3576                 ! empty( $_POST['limit'] ) && is_numeric( $_POST['limit'] ) ? $_POST['limit'] : 200,
    3577                 ! empty( $_POST['offset'] ) && is_numeric( $_POST['offset'] ) ? $_POST['offset'] : 0
     3587                $limit,
     3588                $offset
    35783589            );
    35793590
     
    44484459         */
    44494460        function _email_about_firewall_issue() {
     4461            check_admin_referer( 'fs_resolve_firewall_issues' );
     4462
     4463            if ( ! current_user_can( is_multisite() ? 'manage_options' : 'activate_plugins' ) ) {
     4464                return;
     4465            }
     4466
    44504467            $this->_admin_notices->remove_sticky( 'failed_connect_api' );
    44514468
     
    45224539         */
    45234540        function _retry_connectivity_test() {
     4541            check_admin_referer( 'fs_retry_connectivity_test' );
     4542
     4543            if ( ! current_user_can( is_multisite() ? 'manage_options' : 'activate_plugins' ) ) {
     4544                return;
     4545            }
     4546
    45244547            $this->_admin_notices->remove_sticky( 'failed_connect_api_first' );
    45254548
  • upcasted-s3-offload/trunk/freemius/includes/managers/class-fs-admin-notice-manager.php

    r2331673 r2701591  
    176176         */
    177177        function dismiss_notice_ajax_callback() {
    178             $this->_sticky_storage->remove( $_POST['message_id'] );
     178            check_admin_referer( 'fs_dismiss_notice_action' );
     179
     180            if ( ! is_numeric( $_POST['message_id'] ) ) {
     181                $this->_sticky_storage->remove( $_POST['message_id'] );
     182            }
     183
    179184            wp_die();
    180185        }
  • upcasted-s3-offload/trunk/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php

    r2331673 r2701591  
    11<?php
     2    if ( ! defined( 'ABSPATH' ) ) {
     3        exit;
     4    }
     5
    26    if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
    37        exit;
  • upcasted-s3-offload/trunk/freemius/includes/sdk/Exceptions/EmptyArgumentException.php

    r2331673 r2701591  
    11<?php
     2    if ( ! defined( 'ABSPATH' ) ) {
     3        exit;
     4    }
     5
    26    if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
    37        exit;
  • upcasted-s3-offload/trunk/freemius/includes/sdk/Exceptions/Exception.php

    r2331673 r2701591  
    11<?php
     2        if ( ! defined( 'ABSPATH' ) ) {
     3            exit;
     4        }
     5
    26    if ( ! class_exists( 'Freemius_Exception' ) ) {
    37        /**
  • upcasted-s3-offload/trunk/freemius/includes/sdk/Exceptions/InvalidArgumentException.php

    r2331673 r2701591  
    11<?php
     2    if ( ! defined( 'ABSPATH' ) ) {
     3        exit;
     4    }
     5
    26    if ( ! class_exists( 'Freemius_Exception' ) ) {
    37        exit;
  • upcasted-s3-offload/trunk/freemius/includes/sdk/Exceptions/OAuthException.php

    r2331673 r2701591  
    11<?php
     2    if ( ! defined( 'ABSPATH' ) ) {
     3        exit;
     4    }
     5
    26    if ( ! class_exists( 'Freemius_Exception' ) ) {
    37        exit;
  • upcasted-s3-offload/trunk/freemius/includes/sdk/FreemiusBase.php

    r2423158 r2701591  
    1616     */
    1717
     18    if ( ! defined( 'ABSPATH' ) ) {
     19        exit;
     20    }
     21
    1822    if ( ! defined( 'FS_API__VERSION' ) ) {
    1923        define( 'FS_API__VERSION', '1' );
  • upcasted-s3-offload/trunk/freemius/includes/sdk/FreemiusWordPress.php

    r2423158 r2701591  
    1515     * under the License.
    1616     */
     17    if ( ! defined( 'ABSPATH' ) ) {
     18        exit;
     19    }
    1720
    1821    require_once dirname( __FILE__ ) . '/FreemiusBase.php';
  • upcasted-s3-offload/trunk/freemius/require.php

    r2331673 r2701591  
    66     * @since       1.1.9
    77     */
     8
     9    if ( ! defined( 'ABSPATH' ) ) {
     10        exit;
     11    }
    812
    913    // Configuration should be loaded first.
  • upcasted-s3-offload/trunk/freemius/start.php

    r2508088 r2701591  
    1616     * @var string
    1717     */
    18     $this_sdk_version = '2.4.2';
     18    $this_sdk_version = '2.4.3';
    1919
    2020    #region SDK Selection Logic --------------------------------------------------------------------
  • upcasted-s3-offload/trunk/freemius/templates/account/partials/addon.php

    r2423158 r2701591  
    11<?php
     2
     3    if ( ! defined( 'ABSPATH' ) ) {
     4        exit;
     5    }
     6
    27    /**
    38     * @var array    $VARS
  • upcasted-s3-offload/trunk/freemius/templates/ajax-loader.php

    r2331673 r2701591  
     1<?php
     2    if ( ! defined( 'ABSPATH' ) ) {
     3        exit;
     4    }
     5?>
    16<div class="fs-ajax-loader" style="display: none"><?php for ( $i = 1; $i <= 8; $i ++ ) : ?><div class="fs-ajax-loader-bar fs-ajax-loader-bar-<?php echo $i ?>"></div><?php endfor ?></div>
  • upcasted-s3-offload/trunk/freemius/templates/debug.php

    r2331673 r2701591  
    3838                    $.post( ajaxurl, {
    3939                        action: 'fs_toggle_debug_mode',
     40                        // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
     41                        _wpnonce   : <?php echo wp_json_encode( wp_create_nonce( 'fs_toggle_debug_mode' ) ); ?>,
    4042                        is_on : ($(this).hasClass( 'fs-on' ) ? 1 : 0)
    4143                    }, function ( response ) {
     
    112114                $.post(ajaxurl, {
    113115                    action     : 'fs_get_db_option',
    114                     _wpnonce   : '<?php echo wp_create_nonce( 'fs_get_db_option' ) ?>',
     116                    // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
     117                    _wpnonce   : <?php echo wp_json_encode( wp_create_nonce( 'fs_get_db_option' ) ); ?>,
    115118                    option_name: optionName
    116119                }, function (response) {
     
    132135                    $.post(ajaxurl, {
    133136                        action      : 'fs_set_db_option',
    134                         _wpnonce   : '<?php echo wp_create_nonce( 'fs_set_db_option' ) ?>',
     137                        // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
     138                        _wpnonce    : <?php echo wp_json_encode( wp_create_nonce( 'fs_set_db_option' ) ); ?>,
    135139                        option_name : optionName,
    136140                        option_value: optionValue
     
    725729                $.post(ajaxurl, {
    726730                    action : 'fs_get_debug_log',
     731                    // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
     732                    _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_get_debug_log' ) ); ?>,
    727733                    filters: filters,
    728734                    offset : offset,
  • upcasted-s3-offload/trunk/freemius/templates/firewall-issues-js.php

    r2331673 r2701591  
    2323                ajaxActionSuffix = notice.attr( 'data-manager-id' ).replace( ':', '-' );
    2424
    25             var data = {
    26                 action    : 'fs_resolve_firewall_issues_' + ajaxActionSuffix,
    27                 error_type: error_type
    28             };
     25            var data = {
     26                action   : 'fs_resolve_firewall_issues_' + ajaxActionSuffix,
     27                // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
     28                _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_resolve_firewall_issues' ) ); ?>,
     29                error_type: error_type
     30            };
    2931
    3032            if ( 'squid' === error_type ) {
     
    4042
    4143            if ( 'retry_ping' === error_type ) {
    42                 data.action = 'fs_retry_connectivity_test_' + ajaxActionSuffix;
     44                data.action   = 'fs_retry_connectivity_test_' + ajaxActionSuffix;
     45                // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
     46                data._wpnonce = <?php echo wp_json_encode( wp_create_nonce( 'fs_retry_connectivity_test' ) ); ?>;
    4347            }
    4448
  • upcasted-s3-offload/trunk/freemius/templates/partials/network-activation.php

    r2331673 r2701591  
    11<?php
     2
     3    if ( ! defined( 'ABSPATH' ) ) {
     4        exit;
     5    }
     6
    27    /**
    38     * @var array $VARS
  • upcasted-s3-offload/trunk/freemius/templates/sticky-admin-notice-js.php

    r2331673 r2701591  
    2424            notice.fadeOut( 'fast', function() {
    2525                var data = {
    26                     action    : 'fs_dismiss_notice_action_' + ajaxActionSuffix,
     26                    action   : 'fs_dismiss_notice_action_' + ajaxActionSuffix,
     27                    // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
     28                    _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_dismiss_notice_action' ) ); ?>,
    2729                    message_id: id
    2830                };
  • upcasted-s3-offload/trunk/upcasted-s3-offload.php

    r2665190 r2701591  
    33/**
    44 * @wordpress-plugin
    5  * Plugin Name:       AWS S3 for WordPress Plugin - Upcasted
     5 * Plugin Name:       Upcasted S3 Offload - AWS S3, Digital Ocean Spaces, Minio and more
    66 * Plugin URI:        https://upcasted.com/upcasted-s3-offload
    77 * Description:       Seamless sync between your WordPress Media Library and AWS S3 now in a top notch WordPress plugin with easy licensing and no limitations.
    8  * Version:           3.0.0
     8 * Version:           3.0.1
    99 * Author:            Upcasted
    1010 * Author URI:        https://upcasted.com
     
    6868        require_once dirname( __FILE__ ) . '/vendor/autoload.php';
    6969    }
    70     define( 'UPCASTED_S3_OFFLOAD_VERSION', '3.0.0' );
     70    define( 'UPCASTED_S3_OFFLOAD_VERSION', '3.0.1' );
    7171    if ( !defined( 'UPCASTED_S3_OFFLOAD_SETTINGS' ) ) {
    7272        define( 'UPCASTED_S3_OFFLOAD_SETTINGS', 'upcasted_s3_offload_settings' );
     
    9696        define( 'UPCASTED_REMOVE_CLOUD_FILE', 'upcasted_remove_cloud_file' );
    9797    }
    98     if ( !defined( 'UPCASTED_S3_OFFLOAD_REGION' ) ) {
    99         define( 'UPCASTED_S3_OFFLOAD_REGION', 'upcasted_s3_offload_region' );
     98    if ( !defined( 'UPCASTED_OFFLOAD_REGION' ) ) {
     99        define( 'UPCASTED_OFFLOAD_REGION', 'upcasted_offload_region' );
    100100    }
    101101    if ( !defined( 'UPCASTED_S3_OFFLOAD_BUCKET' ) ) {
Note: See TracChangeset for help on using the changeset viewer.