WP Offload S3 Lite - Version 1.3.2

Version Description

= 1.1 = This is a major change, which ensures S3 URLs are no longer saved in post content. Instead, local URLs are filtered on page generation and replaced with the S3 version. If you depend on the S3 URLs being stored in post content you will need to make modifications to support this version.

= 0.6 = This version requires PHP 5.3.3+ and the Amazon Web Services plugin

Download this release

Release Info

Developer deliciousbrains
Plugin Icon 128x128 WP Offload S3 Lite
Version 1.3.2
Comparing to
See all releases

Code changes from version 1.3.1 to 1.3.2

README.md CHANGED
@@ -3,7 +3,7 @@
3
  **Tags:** uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront
4
  **Requires at least:** 4.6
5
  **Tested up to:** 4.9
6
- **Stable tag:** 1.3.1
7
  **License:** GPLv3
8
 
9
  Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
@@ -69,6 +69,11 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
69
 
70
  ## Changelog ##
71
 
 
 
 
 
 
72
  ### WP Offload S3 Lite 1.3.1 - 2018-02-20 ###
73
  * Bug fix: Fatal error in stream wrapper setup when AWS Keys not set
74
 
3
  **Tags:** uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront
4
  **Requires at least:** 4.6
5
  **Tested up to:** 4.9
6
+ **Stable tag:** 1.3.2
7
  **License:** GPLv3
8
 
9
  Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
69
 
70
  ## Changelog ##
71
 
72
+ ### WP Offload S3 Lite 1.3.2 - 2018-02-22 ###
73
+ * Bug fix: Fatal error: Uncaught Error: Call to undefined method Composer\Autoload\ClassLoader::setClassMapAuthoritative()
74
+ * Bug fix: AWS keys stored in database by Amazon Web Services plugin are not being migrated to new settings record
75
+ * Bug fix: Notice in settings page that Amazon Web Services plugin no longer required is not being shown when Amazon Web Services active
76
+
77
  ### WP Offload S3 Lite 1.3.1 - 2018-02-20 ###
78
  * Bug fix: Fatal error in stream wrapper setup when AWS Keys not set
79
 
classes/amazon-s3-and-cloudfront.php CHANGED
@@ -4592,7 +4592,7 @@ class Amazon_S3_And_CloudFront extends AS3CF_Plugin_Base {
4592
  private function handle_aws_access_key_migration() {
4593
  add_action( 'aws_access_key_form_header', array( $this, 'handle_aws_access_key_form_header' ) );
4594
 
4595
- if ( class_exists( '\Amazon_Web_Services' ) ) {
4596
  $message = sprintf(
4597
  __( '<strong>Amazon Web Services Plugin No Longer Required</strong> &mdash; As of version 1.6 of WP Offload S3, the <a href="%1$s">Amazon Web Services</a> plugin is no longer required. We have removed the dependency by bundling a small portion of the AWS SDK into WP Offload S3. As long as none of your other active plugins or themes depend on the Amazon Web Services plugin, it should be safe to deactivate and delete it. %2$s', 'amazon-s3-and-cloudfront' ),
4598
  'https://wordpress.org/plugins/amazon-web-services/',
@@ -4607,7 +4607,7 @@ class Amazon_S3_And_CloudFront extends AS3CF_Plugin_Base {
4607
 
4608
  if ( is_a( $this->aws, '\DeliciousBrains\WP_Offload_S3\Amazon_Web_Services' ) && $this->aws->needs_access_keys() ) {
4609
  // Have access keys been defined in still active AWS plugin's database settings?
4610
- $aws_settings = get_site_option( \Amazon_Web_Services::SETTINGS_KEY );
4611
 
4612
  // If both AWS keys set and we already have a bucket set, safe to use the AWS keys.
4613
  if ( ! empty( $aws_settings['access_key_id'] ) && ! empty( $aws_settings['secret_access_key'] ) && false !== $this->get_setting( 'bucket' ) ) {
4592
  private function handle_aws_access_key_migration() {
4593
  add_action( 'aws_access_key_form_header', array( $this, 'handle_aws_access_key_form_header' ) );
4594
 
4595
+ if ( is_plugin_active( 'amazon-web-services/amazon-web-services.php' ) ) {
4596
  $message = sprintf(
4597
  __( '<strong>Amazon Web Services Plugin No Longer Required</strong> &mdash; As of version 1.6 of WP Offload S3, the <a href="%1$s">Amazon Web Services</a> plugin is no longer required. We have removed the dependency by bundling a small portion of the AWS SDK into WP Offload S3. As long as none of your other active plugins or themes depend on the Amazon Web Services plugin, it should be safe to deactivate and delete it. %2$s', 'amazon-s3-and-cloudfront' ),
4598
  'https://wordpress.org/plugins/amazon-web-services/',
4607
 
4608
  if ( is_a( $this->aws, '\DeliciousBrains\WP_Offload_S3\Amazon_Web_Services' ) && $this->aws->needs_access_keys() ) {
4609
  // Have access keys been defined in still active AWS plugin's database settings?
4610
+ $aws_settings = get_site_option( 'aws_settings' );
4611
 
4612
  // If both AWS keys set and we already have a bucket set, safe to use the AWS keys.
4613
  if ( ! empty( $aws_settings['access_key_id'] ) && ! empty( $aws_settings['secret_access_key'] ) && false !== $this->get_setting( 'bucket' ) ) {
languages/amazon-s3-and-cloudfront-en.pot CHANGED
@@ -8,7 +8,7 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: amazon-s3-and-cloudfront\n"
10
  "Report-Msgid-Bugs-To: nom@deliciousbrains.com\n"
11
- "POT-Creation-Date: 2018-02-20 23:01+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
8
  msgstr ""
9
  "Project-Id-Version: amazon-s3-and-cloudfront\n"
10
  "Report-Msgid-Bugs-To: nom@deliciousbrains.com\n"
11
+ "POT-Creation-Date: 2018-02-22 21:54+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: bradt, deliciousbrains
3
  Tags: uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront
4
  Requires at least: 4.6
5
  Tested up to: 4.9
6
- Stable tag: 1.3.1
7
  License: GPLv3
8
 
9
  Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
@@ -65,6 +65,11 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
65
 
66
  == Changelog ==
67
 
 
 
 
 
 
68
  = WP Offload S3 Lite 1.3.1 - 2018-02-20 =
69
  * Bug fix: Fatal error in stream wrapper setup when AWS Keys not set
70
 
3
  Tags: uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront
4
  Requires at least: 4.6
5
  Tested up to: 4.9
6
+ Stable tag: 1.3.2
7
  License: GPLv3
8
 
9
  Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
65
 
66
  == Changelog ==
67
 
68
+ = WP Offload S3 Lite 1.3.2 - 2018-02-22 =
69
+ * Bug fix: Fatal error: Uncaught Error: Call to undefined method Composer\Autoload\ClassLoader::setClassMapAuthoritative()
70
+ * Bug fix: AWS keys stored in database by Amazon Web Services plugin are not being migrated to new settings record
71
+ * Bug fix: Notice in settings page that Amazon Web Services plugin no longer required is not being shown when Amazon Web Services active
72
+
73
  = WP Offload S3 Lite 1.3.1 - 2018-02-20 =
74
  * Bug fix: Fatal error in stream wrapper setup when AWS Keys not set
75
 
vendor/Aws2/symfony/event-dispatcher/ContainerAwareEventDispatcher.php CHANGED
@@ -58,7 +58,7 @@ class ContainerAwareEventDispatcher extends \DeliciousBrains\WP_Offload_S3\Aws2\
58
  $this->lazyLoad($eventName);
59
  if (isset($this->listenerIds[$eventName])) {
60
  foreach ($this->listenerIds[$eventName] as $i => $args) {
61
- list($serviceId, $method, $priority) = $args;
62
  $key = $serviceId . '.' . $method;
63
  if (isset($this->listeners[$eventName][$key]) && $listener === array($this->listeners[$eventName][$key], $method)) {
64
  unset($this->listeners[$eventName][$key]);
58
  $this->lazyLoad($eventName);
59
  if (isset($this->listenerIds[$eventName])) {
60
  foreach ($this->listenerIds[$eventName] as $i => $args) {
61
+ list($serviceId, $method) = $args;
62
  $key = $serviceId . '.' . $method;
63
  if (isset($this->listeners[$eventName][$key]) && $listener === array($this->listeners[$eventName][$key], $method)) {
64
  unset($this->listeners[$eventName][$key]);
vendor/Aws2/symfony/event-dispatcher/Event.php CHANGED
@@ -80,7 +80,7 @@ class Event
80
  */
81
  public function getDispatcher()
82
  {
83
- @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.4 and will be removed in 3.0. The event dispatcher instance can be received in the listener call instead.', E_USER_DEPRECATED);
84
  return $this->dispatcher;
85
  }
86
  /**
@@ -92,7 +92,7 @@ class Event
92
  */
93
  public function getName()
94
  {
95
- @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.4 and will be removed in 3.0. The event name can be received in the listener call instead.', E_USER_DEPRECATED);
96
  return $this->name;
97
  }
98
  /**
80
  */
81
  public function getDispatcher()
82
  {
83
+ @trigger_error('The ' . __METHOD__ . ' method is deprecated since Symfony 2.4 and will be removed in 3.0. The event dispatcher instance can be received in the listener call instead.', E_USER_DEPRECATED);
84
  return $this->dispatcher;
85
  }
86
  /**
92
  */
93
  public function getName()
94
  {
95
+ @trigger_error('The ' . __METHOD__ . ' method is deprecated since Symfony 2.4 and will be removed in 3.0. The event name can be received in the listener call instead.', E_USER_DEPRECATED);
96
  return $this->name;
97
  }
98
  /**
vendor/Aws2/symfony/event-dispatcher/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2004-2017 Fabien Potencier
2
 
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
  of this software and associated documentation files (the "Software"), to deal
1
+ Copyright (c) 2004-2018 Fabien Potencier
2
 
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
  of this software and associated documentation files (the "Software"), to deal
vendor/Aws2/vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitb127febfbbf51dd979ed3800a48c7fc1::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit6aae2ad87930358e7c7b36cea3852fa0::getLoader();
vendor/Aws2/vendor/composer/ClassLoader.php CHANGED
@@ -10,12 +10,12 @@
10
  * file that was distributed with this source code.
11
  */
12
 
13
- namespace Composer\Autoload;
14
 
15
  /**
16
  * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
  *
18
- * $loader = new \Composer\Autoload\ClassLoader();
19
  *
20
  * // register classes with namespaces
21
  * $loader->add('Symfony\Component', __DIR__.'/component');
@@ -374,13 +374,9 @@ class ClassLoader
374
 
375
  $first = $class[0];
376
  if (isset($this->prefixLengthsPsr4[$first])) {
377
- $subPath = $class;
378
- while (false !== $lastPos = strrpos($subPath, '\\')) {
379
- $subPath = substr($subPath, 0, $lastPos);
380
- $search = $subPath.'\\';
381
- if (isset($this->prefixDirsPsr4[$search])) {
382
- foreach ($this->prefixDirsPsr4[$search] as $dir) {
383
- $length = $this->prefixLengthsPsr4[$first][$search];
384
  if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
385
  return $file;
386
  }
10
  * file that was distributed with this source code.
11
  */
12
 
13
+ namespace DeliciousBrains\WP_Offload_S3\Aws2\Composer\Autoload;
14
 
15
  /**
16
  * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
  *
18
+ * $loader = new \DeliciousBrains\WP_Offload_S3\Aws2\Composer\Autoload\ClassLoader();
19
  *
20
  * // register classes with namespaces
21
  * $loader->add('Symfony\Component', __DIR__.'/component');
374
 
375
  $first = $class[0];
376
  if (isset($this->prefixLengthsPsr4[$first])) {
377
+ foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
378
+ if (0 === strpos($class, $prefix)) {
379
+ foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
 
 
 
 
380
  if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
381
  return $file;
382
  }
vendor/Aws2/vendor/composer/LICENSE CHANGED
@@ -1,5 +1,5 @@
1
 
2
- Copyright (c) Nils Adermann, Jordi Boggiano
3
 
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
  of this software and associated documentation files (the "Software"), to deal
1
 
2
+ Copyright (c) 2016 Nils Adermann, Jordi Boggiano
3
 
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
  of this software and associated documentation files (the "Software"), to deal
vendor/Aws2/vendor/composer/autoload_real.php CHANGED
@@ -2,13 +2,13 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitb127febfbbf51dd979ed3800a48c7fc1
6
  {
7
  private static $loader;
8
 
9
  public static function loadClassLoader($class)
10
  {
11
- if ('Composer\Autoload\ClassLoader' === $class) {
12
  require __DIR__ . '/ClassLoader.php';
13
  }
14
  }
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitb127febfbbf51dd979ed3800a48c7fc1
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitb127febfbbf51dd979ed3800a48c7fc1', 'loadClassLoader'), true, true);
23
- self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitb127febfbbf51dd979ed3800a48c7fc1', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitb127febfbbf51dd979ed3800a48c7fc1::getInitializer($loader));
31
  } else {
32
  $classMap = require __DIR__ . '/autoload_classmap.php';
33
  if ($classMap) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit6aae2ad87930358e7c7b36cea3852fa0
6
  {
7
  private static $loader;
8
 
9
  public static function loadClassLoader($class)
10
  {
11
+ if ('DeliciousBrains\WP_Offload_S3\Aws2\Composer\Autoload\ClassLoader' === $class) {
12
  require __DIR__ . '/ClassLoader.php';
13
  }
14
  }
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit6aae2ad87930358e7c7b36cea3852fa0', 'loadClassLoader'), true, true);
23
+ self::$loader = $loader = new \DeliciousBrains\WP_Offload_S3\Aws2\Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit6aae2ad87930358e7c7b36cea3852fa0', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\DeliciousBrains\WP_Offload_S3\Aws2\Composer\Autoload\ComposerStaticInit6aae2ad87930358e7c7b36cea3852fa0::getInitializer($loader));
31
  } else {
32
  $classMap = require __DIR__ . '/autoload_classmap.php';
33
  if ($classMap) {
vendor/Aws2/vendor/composer/autoload_static.php CHANGED
@@ -2,9 +2,9 @@
2
 
3
  // autoload_static.php @generated by Composer
4
 
5
- namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitb127febfbbf51dd979ed3800a48c7fc1
8
  {
9
  public static $classMap = array (
10
  'ComposerLintTask' => __DIR__ . '/../..' . '/guzzle/guzzle/phing/tasks/ComposerLintTask.php',
@@ -520,7 +520,7 @@ class ComposerStaticInitb127febfbbf51dd979ed3800a48c7fc1
520
  public static function getInitializer(ClassLoader $loader)
521
  {
522
  return \Closure::bind(function () use ($loader) {
523
- $loader->classMap = ComposerStaticInitb127febfbbf51dd979ed3800a48c7fc1::$classMap;
524
 
525
  }, null, ClassLoader::class);
526
  }
2
 
3
  // autoload_static.php @generated by Composer
4
 
5
+ namespace DeliciousBrains\WP_Offload_S3\Aws2\Composer\Autoload;
6
 
7
+ class ComposerStaticInit6aae2ad87930358e7c7b36cea3852fa0
8
  {
9
  public static $classMap = array (
10
  'ComposerLintTask' => __DIR__ . '/../..' . '/guzzle/guzzle/phing/tasks/ComposerLintTask.php',
520
  public static function getInitializer(ClassLoader $loader)
521
  {
522
  return \Closure::bind(function () use ($loader) {
523
+ $loader->classMap = ComposerStaticInit6aae2ad87930358e7c7b36cea3852fa0::$classMap;
524
 
525
  }, null, ClassLoader::class);
526
  }
wordpress-s3.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Offload S3 Lite
4
  Plugin URI: http://wordpress.org/extend/plugins/amazon-s3-and-cloudfront/
5
  Description: Automatically copies media uploads to Amazon S3 for storage and delivery. Optionally configure Amazon CloudFront for even faster delivery.
6
  Author: Delicious Brains
7
- Version: 1.3.1
8
  Author URI: https://deliciousbrains.com/
9
  Network: True
10
  Text Domain: amazon-s3-and-cloudfront
@@ -26,7 +26,7 @@ Domain Path: /languages/
26
  // Then completely rewritten.
27
  */
28
 
29
- $GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '1.3.1';
30
 
31
  require_once dirname( __FILE__ ) . '/classes/as3cf-compatibility-check.php';
32
 
4
  Plugin URI: http://wordpress.org/extend/plugins/amazon-s3-and-cloudfront/
5
  Description: Automatically copies media uploads to Amazon S3 for storage and delivery. Optionally configure Amazon CloudFront for even faster delivery.
6
  Author: Delicious Brains
7
+ Version: 1.3.2
8
  Author URI: https://deliciousbrains.com/
9
  Network: True
10
  Text Domain: amazon-s3-and-cloudfront
26
  // Then completely rewritten.
27
  */
28
 
29
+ $GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '1.3.2';
30
 
31
  require_once dirname( __FILE__ ) . '/classes/as3cf-compatibility-check.php';
32