WooCommerce Germanized - Version 3.4.2

Version Description

  • Secret box helper error improvements
Download this release

Release Info

Developer vendidero
Plugin Icon 128x128 WooCommerce Germanized
Version 3.4.2
Comparing to
See all releases

Code changes from version 3.4.1 to 3.4.2

includes/class-wc-gzd-secret-box-helper.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- if ( ! class_exists( 'WC_GZD_Secret_Box_Helper' ) && function_exists( 'sodium_crypto_secretbox_keygen' ) ) {
4
 
5
  class WC_GZD_Secret_Box_Helper {
6
 
@@ -82,6 +82,10 @@ if ( ! class_exists( 'WC_GZD_Secret_Box_Helper' ) && function_exists( 'sodium_cr
82
  $key_data = self::get_encryption_key_data( $encryption_type );
83
  $nonce = random_bytes( SODIUM_CRYPTO_SECRETBOX_NONCEBYTES );
84
 
 
 
 
 
85
  return base64_encode( $key_data['salt'] . $nonce . sodium_crypto_secretbox( $message, $nonce, $key_data['key'] ) );
86
  } catch ( \Exception $e ) {
87
  return self::log_error( new WP_Error( 'encrypt-error', sprintf( 'Error while encrypting data: %s', wc_print_r( $e, true ) ) ) );
@@ -113,6 +117,11 @@ if ( ! class_exists( 'WC_GZD_Secret_Box_Helper' ) && function_exists( 'sodium_cr
113
 
114
  $salt = mb_substr( $decoded, 0, SODIUM_CRYPTO_PWHASH_SALTBYTES, '8bit' );
115
  $key_data = self::get_encryption_key_data( $salt, $encryption_type );
 
 
 
 
 
116
  $key = $key_data['key'];
117
  $nonce = mb_substr( $decoded, SODIUM_CRYPTO_PWHASH_SALTBYTES, SODIUM_CRYPTO_SECRETBOX_NONCEBYTES, '8bit' );
118
  $ciphertext = mb_substr( $decoded, SODIUM_CRYPTO_PWHASH_SALTBYTES + SODIUM_CRYPTO_SECRETBOX_NONCEBYTES, null, '8bit' );
@@ -123,6 +132,11 @@ if ( ! class_exists( 'WC_GZD_Secret_Box_Helper' ) && function_exists( 'sodium_cr
123
  */
124
  if ( $plain === false ) {
125
  $key_data = self::get_encryption_key_data( $salt, $encryption_type, true );
 
 
 
 
 
126
  $key = $key_data['key'];
127
  $plain = sodium_crypto_secretbox_open( $ciphertext, $nonce, $key );
128
  }
1
  <?php
2
 
3
+ if ( ! class_exists( 'WC_GZD_Secret_Box_Helper' ) && function_exists( 'sodium_crypto_secretbox_keygen' ) && defined( 'SODIUM_CRYPTO_PWHASH_SALTBYTES' ) ) {
4
 
5
  class WC_GZD_Secret_Box_Helper {
6
 
82
  $key_data = self::get_encryption_key_data( $encryption_type );
83
  $nonce = random_bytes( SODIUM_CRYPTO_SECRETBOX_NONCEBYTES );
84
 
85
+ if ( is_wp_error( $key_data ) ) {
86
+ return $key_data;
87
+ }
88
+
89
  return base64_encode( $key_data['salt'] . $nonce . sodium_crypto_secretbox( $message, $nonce, $key_data['key'] ) );
90
  } catch ( \Exception $e ) {
91
  return self::log_error( new WP_Error( 'encrypt-error', sprintf( 'Error while encrypting data: %s', wc_print_r( $e, true ) ) ) );
117
 
118
  $salt = mb_substr( $decoded, 0, SODIUM_CRYPTO_PWHASH_SALTBYTES, '8bit' );
119
  $key_data = self::get_encryption_key_data( $salt, $encryption_type );
120
+
121
+ if ( is_wp_error( $key_data ) ) {
122
+ return $key_data;
123
+ }
124
+
125
  $key = $key_data['key'];
126
  $nonce = mb_substr( $decoded, SODIUM_CRYPTO_PWHASH_SALTBYTES, SODIUM_CRYPTO_SECRETBOX_NONCEBYTES, '8bit' );
127
  $ciphertext = mb_substr( $decoded, SODIUM_CRYPTO_PWHASH_SALTBYTES + SODIUM_CRYPTO_SECRETBOX_NONCEBYTES, null, '8bit' );
132
  */
133
  if ( $plain === false ) {
134
  $key_data = self::get_encryption_key_data( $salt, $encryption_type, true );
135
+
136
+ if ( is_wp_error( $key_data ) ) {
137
+ return $key_data;
138
+ }
139
+
140
  $key = $key_data['key'];
141
  $plain = sodium_crypto_secretbox_open( $ciphertext, $nonce, $key );
142
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires at least: 5.4
5
  Tested up to: 5.7
6
  WC requires at least: 3.9
7
  WC tested up to: 5.2
8
- Stable tag: 3.4.1
9
  Requires PHP: 5.6
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -186,6 +186,9 @@ Bug reports may be filed via our [GitHub repository](https://github.com/vendider
186
  6. Edit pdf documents (Pro)
187
 
188
  == Changelog ==
 
 
 
189
  = 3.4.1 =
190
  * Fixed load error while accessing shipping provider settings
191
 
5
  Tested up to: 5.7
6
  WC requires at least: 3.9
7
  WC tested up to: 5.2
8
+ Stable tag: 3.4.2
9
  Requires PHP: 5.6
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
186
  6. Edit pdf documents (Pro)
187
 
188
  == Changelog ==
189
+ = 3.4.2 =
190
+ * Secret box helper error improvements
191
+
192
  = 3.4.1 =
193
  * Fixed load error while accessing shipping provider settings
194
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitc6bb2527dd5d17e23cfdf6f7f787f64e::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit85b7121b9ab80c0fbdd0f5f568ef6a37::getLoader();
vendor/autoload_packages.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpc6bb2527dd5d17e23cfdf6f7f787f64e;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85b7121b9ab80c0fbdd0f5f568ef6a37;
9
 
10
  // phpcs:ignore
11
 
vendor/composer/InstalledVersions.php CHANGED
@@ -19,7 +19,7 @@ private static $installed = array (
19
  'aliases' =>
20
  array (
21
  ),
22
- 'reference' => 'de186e841dfed4d42348de77c1737ba955a77ea1',
23
  'name' => 'vendidero/woocommerce-germanized',
24
  ),
25
  'versions' =>
@@ -121,7 +121,7 @@ private static $installed = array (
121
  'aliases' =>
122
  array (
123
  ),
124
- 'reference' => 'de186e841dfed4d42348de77c1737ba955a77ea1',
125
  ),
126
  'vendidero/woocommerce-germanized-dhl' =>
127
  array (
19
  'aliases' =>
20
  array (
21
  ),
22
+ 'reference' => 'acd17643c58e0968904d4459f45c4838e93b0312',
23
  'name' => 'vendidero/woocommerce-germanized',
24
  ),
25
  'versions' =>
121
  'aliases' =>
122
  array (
123
  ),
124
+ 'reference' => 'acd17643c58e0968904d4459f45c4838e93b0312',
125
  ),
126
  'vendidero/woocommerce-germanized-dhl' =>
127
  array (
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitc6bb2527dd5d17e23cfdf6f7f787f64e
6
  {
7
  private static $loader;
8
 
@@ -24,15 +24,15 @@ class ComposerAutoloaderInitc6bb2527dd5d17e23cfdf6f7f787f64e
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInitc6bb2527dd5d17e23cfdf6f7f787f64e', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
29
- spl_autoload_unregister(array('ComposerAutoloaderInitc6bb2527dd5d17e23cfdf6f7f787f64e', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
- call_user_func(\Composer\Autoload\ComposerStaticInitc6bb2527dd5d17e23cfdf6f7f787f64e::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
@@ -53,19 +53,19 @@ class ComposerAutoloaderInitc6bb2527dd5d17e23cfdf6f7f787f64e
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
- $includeFiles = Composer\Autoload\ComposerStaticInitc6bb2527dd5d17e23cfdf6f7f787f64e::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
- composerRequirec6bb2527dd5d17e23cfdf6f7f787f64e($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
- function composerRequirec6bb2527dd5d17e23cfdf6f7f787f64e($fileIdentifier, $file)
69
  {
70
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
71
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit85b7121b9ab80c0fbdd0f5f568ef6a37
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInit85b7121b9ab80c0fbdd0f5f568ef6a37', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
29
+ spl_autoload_unregister(array('ComposerAutoloaderInit85b7121b9ab80c0fbdd0f5f568ef6a37', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
+ call_user_func(\Composer\Autoload\ComposerStaticInit85b7121b9ab80c0fbdd0f5f568ef6a37::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
+ $includeFiles = Composer\Autoload\ComposerStaticInit85b7121b9ab80c0fbdd0f5f568ef6a37::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
+ composerRequire85b7121b9ab80c0fbdd0f5f568ef6a37($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
+ function composerRequire85b7121b9ab80c0fbdd0f5f568ef6a37($fileIdentifier, $file)
69
  {
70
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
71
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitc6bb2527dd5d17e23cfdf6f7f787f64e
8
  {
9
  public static $files = array (
10
  '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
@@ -458,9 +458,9 @@ class ComposerStaticInitc6bb2527dd5d17e23cfdf6f7f787f64e
458
  public static function getInitializer(ClassLoader $loader)
459
  {
460
  return \Closure::bind(function () use ($loader) {
461
- $loader->prefixLengthsPsr4 = ComposerStaticInitc6bb2527dd5d17e23cfdf6f7f787f64e::$prefixLengthsPsr4;
462
- $loader->prefixDirsPsr4 = ComposerStaticInitc6bb2527dd5d17e23cfdf6f7f787f64e::$prefixDirsPsr4;
463
- $loader->classMap = ComposerStaticInitc6bb2527dd5d17e23cfdf6f7f787f64e::$classMap;
464
 
465
  }, null, ClassLoader::class);
466
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit85b7121b9ab80c0fbdd0f5f568ef6a37
8
  {
9
  public static $files = array (
10
  '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
458
  public static function getInitializer(ClassLoader $loader)
459
  {
460
  return \Closure::bind(function () use ($loader) {
461
+ $loader->prefixLengthsPsr4 = ComposerStaticInit85b7121b9ab80c0fbdd0f5f568ef6a37::$prefixLengthsPsr4;
462
+ $loader->prefixDirsPsr4 = ComposerStaticInit85b7121b9ab80c0fbdd0f5f568ef6a37::$prefixDirsPsr4;
463
+ $loader->classMap = ComposerStaticInit85b7121b9ab80c0fbdd0f5f568ef6a37::$classMap;
464
 
465
  }, null, ClassLoader::class);
466
  }
vendor/composer/installed.php CHANGED
@@ -6,7 +6,7 @@
6
  'aliases' =>
7
  array (
8
  ),
9
- 'reference' => 'de186e841dfed4d42348de77c1737ba955a77ea1',
10
  'name' => 'vendidero/woocommerce-germanized',
11
  ),
12
  'versions' =>
@@ -108,7 +108,7 @@
108
  'aliases' =>
109
  array (
110
  ),
111
- 'reference' => 'de186e841dfed4d42348de77c1737ba955a77ea1',
112
  ),
113
  'vendidero/woocommerce-germanized-dhl' =>
114
  array (
6
  'aliases' =>
7
  array (
8
  ),
9
+ 'reference' => 'acd17643c58e0968904d4459f45c4838e93b0312',
10
  'name' => 'vendidero/woocommerce-germanized',
11
  ),
12
  'versions' =>
108
  'aliases' =>
109
  array (
110
  ),
111
+ 'reference' => 'acd17643c58e0968904d4459f45c4838e93b0312',
112
  ),
113
  'vendidero/woocommerce-germanized-dhl' =>
114
  array (
vendor/jetpack-autoloader/class-autoloader-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpc6bb2527dd5d17e23cfdf6f7f787f64e;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85b7121b9ab80c0fbdd0f5f568ef6a37;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-autoloader-locator.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpc6bb2527dd5d17e23cfdf6f7f787f64e;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85b7121b9ab80c0fbdd0f5f568ef6a37;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-autoloader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpc6bb2527dd5d17e23cfdf6f7f787f64e;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85b7121b9ab80c0fbdd0f5f568ef6a37;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-container.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpc6bb2527dd5d17e23cfdf6f7f787f64e;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85b7121b9ab80c0fbdd0f5f568ef6a37;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-hook-manager.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpc6bb2527dd5d17e23cfdf6f7f787f64e;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85b7121b9ab80c0fbdd0f5f568ef6a37;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-latest-autoloader-guard.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpc6bb2527dd5d17e23cfdf6f7f787f64e;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85b7121b9ab80c0fbdd0f5f568ef6a37;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-manifest-reader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpc6bb2527dd5d17e23cfdf6f7f787f64e;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85b7121b9ab80c0fbdd0f5f568ef6a37;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-path-processor.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpc6bb2527dd5d17e23cfdf6f7f787f64e;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85b7121b9ab80c0fbdd0f5f568ef6a37;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-plugin-locator.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpc6bb2527dd5d17e23cfdf6f7f787f64e;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85b7121b9ab80c0fbdd0f5f568ef6a37;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-plugins-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpc6bb2527dd5d17e23cfdf6f7f787f64e;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85b7121b9ab80c0fbdd0f5f568ef6a37;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-version-loader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpc6bb2527dd5d17e23cfdf6f7f787f64e;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85b7121b9ab80c0fbdd0f5f568ef6a37;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-version-selector.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpc6bb2527dd5d17e23cfdf6f7f787f64e;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85b7121b9ab80c0fbdd0f5f568ef6a37;
9
 
10
  // phpcs:ignore
11
 
woocommerce-germanized.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Germanized for WooCommerce
4
  * Plugin URI: https://www.vendidero.de/woocommerce-germanized
5
  * Description: Germanized for WooCommerce extends WooCommerce to become a legally compliant store in the german market.
6
- * Version: 3.4.1
7
  * Author: vendidero
8
  * Author URI: https://vendidero.de
9
  * Requires at least: 4.9
@@ -69,7 +69,7 @@ if ( ! class_exists( 'WooCommerce_Germanized' ) ) :
69
  *
70
  * @var string
71
  */
72
- public $version = '3.4.1';
73
 
74
  /**
75
  * @var WooCommerce_Germanized $instance of the plugin
3
  * Plugin Name: Germanized for WooCommerce
4
  * Plugin URI: https://www.vendidero.de/woocommerce-germanized
5
  * Description: Germanized for WooCommerce extends WooCommerce to become a legally compliant store in the german market.
6
+ * Version: 3.4.2
7
  * Author: vendidero
8
  * Author URI: https://vendidero.de
9
  * Requires at least: 4.9
69
  *
70
  * @var string
71
  */
72
+ public $version = '3.4.2';
73
 
74
  /**
75
  * @var WooCommerce_Germanized $instance of the plugin