Changeset 3010297
- Timestamp:
- 12/14/2023 11:10:42 PM (2 years ago)
- Location:
- bigcommerce
- Files:
-
- 2 added
- 26 edited
- 1 copied
-
tags/5.0.7 (copied) (copied from bigcommerce/trunk)
-
tags/5.0.7/CHANGELOG.md (modified) (2 diffs)
-
tags/5.0.7/bigcommerce.php (modified) (1 diff)
-
tags/5.0.7/build-timestamp.php (modified) (1 diff)
-
tags/5.0.7/src/BigCommerce/Logging/Error_Log.php (modified) (1 diff)
-
tags/5.0.7/src/BigCommerce/Plugin.php (modified) (1 diff)
-
tags/5.0.7/vendor/autoload.php (modified) (1 diff)
-
tags/5.0.7/vendor/composer/ClassLoader.php (modified) (24 diffs)
-
tags/5.0.7/vendor/composer/autoload_classmap.php (modified) (3 diffs)
-
tags/5.0.7/vendor/composer/autoload_files.php (modified) (1 diff)
-
tags/5.0.7/vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
tags/5.0.7/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
tags/5.0.7/vendor/composer/autoload_real.php (modified) (3 diffs)
-
tags/5.0.7/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/5.0.7/vendor/composer/platform_check.php (added)
-
trunk/CHANGELOG.md (modified) (2 diffs)
-
trunk/bigcommerce.php (modified) (1 diff)
-
trunk/build-timestamp.php (modified) (1 diff)
-
trunk/src/BigCommerce/Logging/Error_Log.php (modified) (1 diff)
-
trunk/src/BigCommerce/Plugin.php (modified) (1 diff)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/ClassLoader.php (modified) (24 diffs)
-
trunk/vendor/composer/autoload_classmap.php (modified) (3 diffs)
-
trunk/vendor/composer/autoload_files.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (3 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/platform_check.php (added)
Legend:
- Unmodified
- Added
- Removed
-
bigcommerce/tags/5.0.7/CHANGELOG.md
r2995239 r3010297 1 1 # Changelog 2 3 ## [5.0.7] 4 5 ### Fixed 6 - Fix CVE-2023-49162 2 7 3 8 ## [5.0.6] … … 1910 1915 1911 1916 1912 [5.0.5]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.5...5.0.6 1917 [5.0.7]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.6...5.0.7 1918 [5.0.6]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.5...5.0.6 1913 1919 [5.0.5]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.4...5.0.5 1914 1920 [5.0.4]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.3...5.0.4 -
bigcommerce/tags/5.0.7/bigcommerce.php
r2995239 r3010297 4 4 Description: Scale your ecommerce business with WordPress on the front-end and BigCommerce on the back end. Free up server resources from things like catalog management, processing payments, and managing fulfillment logistics. 5 5 Author: BigCommerce 6 Version: 5.0. 66 Version: 5.0.7 7 7 Author URI: https://www.bigcommerce.com/wordpress 8 8 Requires PHP: 7.4.0 -
bigcommerce/tags/5.0.7/build-timestamp.php
r2995239 r3010297 1 1 <?php 2 define('BIGCOMMERCE_ASSETS_BUILD_TIMESTAMP', ' 9.18.11.13.2023');2 define('BIGCOMMERCE_ASSETS_BUILD_TIMESTAMP', '11.48.12.14.2023'); -
bigcommerce/tags/5.0.7/src/BigCommerce/Logging/Error_Log.php
r2865940 r3010297 154 154 */ 155 155 private function write_htaccess( $directory_path ) { 156 $htaccess_file = fopen( $directory_path . " .htaccess", "a+" );156 $htaccess_file = fopen( $directory_path . "/.htaccess", "a+" ); 157 157 158 158 $rulles = <<<HTACCESS -
bigcommerce/tags/5.0.7/src/BigCommerce/Plugin.php
r2995239 r3010297 5 5 6 6 class Plugin { 7 const VERSION = '5.0. 6';7 const VERSION = '5.0.7'; 8 8 9 9 protected static $_instance; -
bigcommerce/tags/5.0.7/vendor/autoload.php
r2975364 r3010297 3 3 // autoload.php @generated by Composer 4 4 5 if (PHP_VERSION_ID < 50600) { 6 if (!headers_sent()) { 7 header('HTTP/1.1 500 Internal Server Error'); 8 } 9 $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 10 if (!ini_get('display_errors')) { 11 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 12 fwrite(STDERR, $err); 13 } elseif (!headers_sent()) { 14 echo $err; 15 } 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 21 } 22 5 23 require_once __DIR__ . '/composer/autoload_real.php'; 6 24 -
bigcommerce/tags/5.0.7/vendor/composer/ClassLoader.php
r2975364 r3010297 38 38 * @author Fabien Potencier <fabien@symfony.com> 39 39 * @author Jordi Boggiano <j.boggiano@seld.be> 40 * @see http ://www.php-fig.org/psr/psr-0/41 * @see http ://www.php-fig.org/psr/psr-4/40 * @see https://www.php-fig.org/psr/psr-0/ 41 * @see https://www.php-fig.org/psr/psr-4/ 42 42 */ 43 43 class ClassLoader 44 44 { 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 48 /** @var string|null */ 49 private $vendorDir; 50 45 51 // PSR-4 52 /** 53 * @var array<string, array<string, int>> 54 */ 46 55 private $prefixLengthsPsr4 = array(); 56 /** 57 * @var array<string, list<string>> 58 */ 47 59 private $prefixDirsPsr4 = array(); 60 /** 61 * @var list<string> 62 */ 48 63 private $fallbackDirsPsr4 = array(); 49 64 50 65 // PSR-0 66 /** 67 * List of PSR-0 prefixes 68 * 69 * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) 70 * 71 * @var array<string, array<string, list<string>>> 72 */ 51 73 private $prefixesPsr0 = array(); 74 /** 75 * @var list<string> 76 */ 52 77 private $fallbackDirsPsr0 = array(); 53 78 79 /** @var bool */ 54 80 private $useIncludePath = false; 81 82 /** 83 * @var array<string, string> 84 */ 55 85 private $classMap = array(); 86 87 /** @var bool */ 56 88 private $classMapAuthoritative = false; 89 90 /** 91 * @var array<string, bool> 92 */ 57 93 private $missingClasses = array(); 94 95 /** @var string|null */ 58 96 private $apcuPrefix; 59 97 98 /** 99 * @var array<string, self> 100 */ 101 private static $registeredLoaders = array(); 102 103 /** 104 * @param string|null $vendorDir 105 */ 106 public function __construct($vendorDir = null) 107 { 108 $this->vendorDir = $vendorDir; 109 self::initializeIncludeClosure(); 110 } 111 112 /** 113 * @return array<string, list<string>> 114 */ 60 115 public function getPrefixes() 61 116 { 62 117 if (!empty($this->prefixesPsr0)) { 63 return call_user_func_array('array_merge', $this->prefixesPsr0);118 return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); 64 119 } 65 120 … … 67 122 } 68 123 124 /** 125 * @return array<string, list<string>> 126 */ 69 127 public function getPrefixesPsr4() 70 128 { … … 72 130 } 73 131 132 /** 133 * @return list<string> 134 */ 74 135 public function getFallbackDirs() 75 136 { … … 77 138 } 78 139 140 /** 141 * @return list<string> 142 */ 79 143 public function getFallbackDirsPsr4() 80 144 { … … 82 146 } 83 147 148 /** 149 * @return array<string, string> Array of classname => path 150 */ 84 151 public function getClassMap() 85 152 { … … 88 155 89 156 /** 90 * @param array $classMap Class to filename map 157 * @param array<string, string> $classMap Class to filename map 158 * 159 * @return void 91 160 */ 92 161 public function addClassMap(array $classMap) … … 103 172 * appending or prepending to the ones previously set for this prefix. 104 173 * 105 * @param string $prefix The prefix 106 * @param array|string $paths The PSR-0 root directories 107 * @param bool $prepend Whether to prepend the directories 174 * @param string $prefix The prefix 175 * @param list<string>|string $paths The PSR-0 root directories 176 * @param bool $prepend Whether to prepend the directories 177 * 178 * @return void 108 179 */ 109 180 public function add($prefix, $paths, $prepend = false) 110 181 { 182 $paths = (array) $paths; 111 183 if (!$prefix) { 112 184 if ($prepend) { 113 185 $this->fallbackDirsPsr0 = array_merge( 114 (array)$paths,186 $paths, 115 187 $this->fallbackDirsPsr0 116 188 ); … … 118 190 $this->fallbackDirsPsr0 = array_merge( 119 191 $this->fallbackDirsPsr0, 120 (array)$paths192 $paths 121 193 ); 122 194 } … … 127 199 $first = $prefix[0]; 128 200 if (!isset($this->prefixesPsr0[$first][$prefix])) { 129 $this->prefixesPsr0[$first][$prefix] = (array)$paths;201 $this->prefixesPsr0[$first][$prefix] = $paths; 130 202 131 203 return; … … 133 205 if ($prepend) { 134 206 $this->prefixesPsr0[$first][$prefix] = array_merge( 135 (array)$paths,207 $paths, 136 208 $this->prefixesPsr0[$first][$prefix] 137 209 ); … … 139 211 $this->prefixesPsr0[$first][$prefix] = array_merge( 140 212 $this->prefixesPsr0[$first][$prefix], 141 (array)$paths213 $paths 142 214 ); 143 215 } … … 148 220 * appending or prepending to the ones previously set for this namespace. 149 221 * 150 * @param string $prefix The prefix/namespace, with trailing '\\'151 * @param array|string $paths The PSR-4 base directories152 * @param bool $prepend Whether to prepend the directories222 * @param string $prefix The prefix/namespace, with trailing '\\' 223 * @param list<string>|string $paths The PSR-4 base directories 224 * @param bool $prepend Whether to prepend the directories 153 225 * 154 226 * @throws \InvalidArgumentException 227 * 228 * @return void 155 229 */ 156 230 public function addPsr4($prefix, $paths, $prepend = false) 157 231 { 232 $paths = (array) $paths; 158 233 if (!$prefix) { 159 234 // Register directories for the root namespace. 160 235 if ($prepend) { 161 236 $this->fallbackDirsPsr4 = array_merge( 162 (array)$paths,237 $paths, 163 238 $this->fallbackDirsPsr4 164 239 ); … … 166 241 $this->fallbackDirsPsr4 = array_merge( 167 242 $this->fallbackDirsPsr4, 168 (array)$paths243 $paths 169 244 ); 170 245 } … … 176 251 } 177 252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 178 $this->prefixDirsPsr4[$prefix] = (array)$paths;253 $this->prefixDirsPsr4[$prefix] = $paths; 179 254 } elseif ($prepend) { 180 255 // Prepend directories for an already registered namespace. 181 256 $this->prefixDirsPsr4[$prefix] = array_merge( 182 (array)$paths,257 $paths, 183 258 $this->prefixDirsPsr4[$prefix] 184 259 ); … … 187 262 $this->prefixDirsPsr4[$prefix] = array_merge( 188 263 $this->prefixDirsPsr4[$prefix], 189 (array)$paths264 $paths 190 265 ); 191 266 } … … 196 271 * replacing any others previously set for this prefix. 197 272 * 198 * @param string $prefix The prefix 199 * @param array|string $paths The PSR-0 base directories 273 * @param string $prefix The prefix 274 * @param list<string>|string $paths The PSR-0 base directories 275 * 276 * @return void 200 277 */ 201 278 public function set($prefix, $paths) … … 212 289 * replacing any others previously set for this namespace. 213 290 * 214 * @param string $prefix The prefix/namespace, with trailing '\\'215 * @param array|string $paths The PSR-4 base directories291 * @param string $prefix The prefix/namespace, with trailing '\\' 292 * @param list<string>|string $paths The PSR-4 base directories 216 293 * 217 294 * @throws \InvalidArgumentException 295 * 296 * @return void 218 297 */ 219 298 public function setPsr4($prefix, $paths) … … 235 314 * 236 315 * @param bool $useIncludePath 316 * 317 * @return void 237 318 */ 238 319 public function setUseIncludePath($useIncludePath) … … 257 338 * 258 339 * @param bool $classMapAuthoritative 340 * 341 * @return void 259 342 */ 260 343 public function setClassMapAuthoritative($classMapAuthoritative) … … 277 360 * 278 361 * @param string|null $apcuPrefix 362 * 363 * @return void 279 364 */ 280 365 public function setApcuPrefix($apcuPrefix) … … 297 382 * 298 383 * @param bool $prepend Whether to prepend the autoloader or not 384 * 385 * @return void 299 386 */ 300 387 public function register($prepend = false) 301 388 { 302 389 spl_autoload_register(array($this, 'loadClass'), true, $prepend); 390 391 if (null === $this->vendorDir) { 392 return; 393 } 394 395 if ($prepend) { 396 self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; 397 } else { 398 unset(self::$registeredLoaders[$this->vendorDir]); 399 self::$registeredLoaders[$this->vendorDir] = $this; 400 } 303 401 } 304 402 305 403 /** 306 404 * Unregisters this instance as an autoloader. 405 * 406 * @return void 307 407 */ 308 408 public function unregister() 309 409 { 310 410 spl_autoload_unregister(array($this, 'loadClass')); 411 412 if (null !== $this->vendorDir) { 413 unset(self::$registeredLoaders[$this->vendorDir]); 414 } 311 415 } 312 416 … … 315 419 * 316 420 * @param string $class The name of the class 317 * @return bool|null True if loaded, null otherwise421 * @return true|null True if loaded, null otherwise 318 422 */ 319 423 public function loadClass($class) 320 424 { 321 425 if ($file = $this->findFile($class)) { 322 includeFile($file); 426 $includeFile = self::$includeFile; 427 $includeFile($file); 323 428 324 429 return true; 325 430 } 431 432 return null; 326 433 } 327 434 … … 368 475 } 369 476 477 /** 478 * Returns the currently registered loaders keyed by their corresponding vendor directories. 479 * 480 * @return array<string, self> 481 */ 482 public static function getRegisteredLoaders() 483 { 484 return self::$registeredLoaders; 485 } 486 487 /** 488 * @param string $class 489 * @param string $ext 490 * @return string|false 491 */ 370 492 private function findFileWithExtension($class, $ext) 371 493 { … … 433 555 return false; 434 556 } 557 558 /** 559 * @return void 560 */ 561 private static function initializeIncludeClosure() 562 { 563 if (self::$includeFile !== null) { 564 return; 565 } 566 567 /** 568 * Scope isolated include. 569 * 570 * Prevents access to $this/self from included files. 571 * 572 * @param string $file 573 * @return void 574 */ 575 self::$includeFile = \Closure::bind(static function($file) { 576 include $file; 577 }, null, null); 578 } 435 579 } 436 437 /**438 * Scope isolated include.439 *440 * Prevents access to $this/self from included files.441 */442 function includeFile($file)443 {444 include $file;445 } -
bigcommerce/tags/5.0.7/vendor/composer/autoload_classmap.php
r2975364 r3010297 3 3 // autoload_classmap.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 … … 741 741 'BigCommerce\\Templates\\Address_New' => $baseDir . '/src/BigCommerce/Templates/Address_New.php', 742 742 'BigCommerce\\Templates\\Amp_Cart_Actions' => $baseDir . '/src/BigCommerce/Templates/Amp_Cart_Actions.php', 743 'BigCommerce\\Templates\\Amp_Cart_Items' => $baseDir . '/src/BigCommerce/Templates/Amp_Cart_items.php',744 743 'BigCommerce\\Templates\\Amp_Cart_Summary' => $baseDir . '/src/BigCommerce/Templates/Amp_Cart_Summary.php', 745 744 'BigCommerce\\Templates\\Body_Classes' => $baseDir . '/src/BigCommerce/Templates/Body_Classes.php', … … 956 955 'Bigcommerce\\Test\\Unit\\Api\\Resources\\SkuOptionTest' => $vendorDir . '/bigcommerce/api/test/Unit/Api/Resources/SkuOptionTest.php', 957 956 'Bigcommerce\\Test\\Unit\\Api\\Resources\\SkuTest' => $vendorDir . '/bigcommerce/api/test/Unit/Api/Resources/SkuTest.php', 958 'Bigcommerce\\Test\\Unit\\ConnectionTest' => $vendorDir . '/bigcommerce/api/test/Unit/Api/ConnectionTest.php', 959 'Bigcommerce\\Test\\Unit\\ErrorTest' => $vendorDir . '/bigcommerce/api/test/Unit/Api/ErrorTest.php', 957 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 960 958 'Dotenv\\Dotenv' => $vendorDir . '/vlucas/phpdotenv/src/Dotenv.php', 961 959 'Dotenv\\Exception\\ExceptionInterface' => $vendorDir . '/vlucas/phpdotenv/src/Exception/ExceptionInterface.php', -
bigcommerce/tags/5.0.7/vendor/composer/autoload_files.php
r2975364 r3010297 3 3 // autoload_files.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
bigcommerce/tags/5.0.7/vendor/composer/autoload_namespaces.php
r2975364 r3010297 3 3 // autoload_namespaces.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
bigcommerce/tags/5.0.7/vendor/composer/autoload_psr4.php
r2975364 r3010297 3 3 // autoload_psr4.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
bigcommerce/tags/5.0.7/vendor/composer/autoload_real.php
r2975364 r3010297 14 14 } 15 15 16 /** 17 * @return \Composer\Autoload\ClassLoader 18 */ 16 19 public static function getLoader() 17 20 { … … 20 23 } 21 24 25 require __DIR__ . '/platform_check.php'; 26 22 27 spl_autoload_register(array('ComposerAutoloaderInite3b7bc6dcf7f80d1326d7975fb9f5e3f', 'loadClassLoader'), true, true); 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader( );28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 24 29 spl_autoload_unregister(array('ComposerAutoloaderInite3b7bc6dcf7f80d1326d7975fb9f5e3f', 'loadClassLoader')); 25 30 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\ComposerStaticInite3b7bc6dcf7f80d1326d7975fb9f5e3f::getInitializer($loader)); 31 } else { 32 $classMap = require __DIR__ . '/autoload_classmap.php'; 33 if ($classMap) { 34 $loader->addClassMap($classMap); 35 } 36 } 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInite3b7bc6dcf7f80d1326d7975fb9f5e3f::getInitializer($loader)); 37 33 38 34 $loader->setClassMapAuthoritative(true); 39 35 $loader->register(true); 40 36 41 if ($useStaticLoader) { 42 $includeFiles = Composer\Autoload\ComposerStaticInite3b7bc6dcf7f80d1326d7975fb9f5e3f::$files; 43 } else { 44 $includeFiles = require __DIR__ . '/autoload_files.php'; 45 } 46 foreach ($includeFiles as $fileIdentifier => $file) { 47 composerRequiree3b7bc6dcf7f80d1326d7975fb9f5e3f($fileIdentifier, $file); 37 $filesToLoad = \Composer\Autoload\ComposerStaticInite3b7bc6dcf7f80d1326d7975fb9f5e3f::$files; 38 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 39 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { 40 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; 41 42 require $file; 43 } 44 }, null, null); 45 foreach ($filesToLoad as $fileIdentifier => $file) { 46 $requireFile($fileIdentifier, $file); 48 47 } 49 48 … … 51 50 } 52 51 } 53 54 function composerRequiree3b7bc6dcf7f80d1326d7975fb9f5e3f($fileIdentifier, $file)55 {56 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {57 require $file;58 59 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;60 }61 } -
bigcommerce/tags/5.0.7/vendor/composer/autoload_static.php
r2975364 r3010297 824 824 'BigCommerce\\Templates\\Address_New' => __DIR__ . '/../..' . '/src/BigCommerce/Templates/Address_New.php', 825 825 'BigCommerce\\Templates\\Amp_Cart_Actions' => __DIR__ . '/../..' . '/src/BigCommerce/Templates/Amp_Cart_Actions.php', 826 'BigCommerce\\Templates\\Amp_Cart_Items' => __DIR__ . '/../..' . '/src/BigCommerce/Templates/Amp_Cart_items.php',827 826 'BigCommerce\\Templates\\Amp_Cart_Summary' => __DIR__ . '/../..' . '/src/BigCommerce/Templates/Amp_Cart_Summary.php', 828 827 'BigCommerce\\Templates\\Body_Classes' => __DIR__ . '/../..' . '/src/BigCommerce/Templates/Body_Classes.php', … … 1039 1038 'Bigcommerce\\Test\\Unit\\Api\\Resources\\SkuOptionTest' => __DIR__ . '/..' . '/bigcommerce/api/test/Unit/Api/Resources/SkuOptionTest.php', 1040 1039 'Bigcommerce\\Test\\Unit\\Api\\Resources\\SkuTest' => __DIR__ . '/..' . '/bigcommerce/api/test/Unit/Api/Resources/SkuTest.php', 1041 'Bigcommerce\\Test\\Unit\\ConnectionTest' => __DIR__ . '/..' . '/bigcommerce/api/test/Unit/Api/ConnectionTest.php', 1042 'Bigcommerce\\Test\\Unit\\ErrorTest' => __DIR__ . '/..' . '/bigcommerce/api/test/Unit/Api/ErrorTest.php', 1040 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 1043 1041 'Dotenv\\Dotenv' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Dotenv.php', 1044 1042 'Dotenv\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/ExceptionInterface.php', -
bigcommerce/trunk/CHANGELOG.md
r2995239 r3010297 1 1 # Changelog 2 3 ## [5.0.7] 4 5 ### Fixed 6 - Fix CVE-2023-49162 2 7 3 8 ## [5.0.6] … … 1910 1915 1911 1916 1912 [5.0.5]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.5...5.0.6 1917 [5.0.7]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.6...5.0.7 1918 [5.0.6]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.5...5.0.6 1913 1919 [5.0.5]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.4...5.0.5 1914 1920 [5.0.4]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.3...5.0.4 -
bigcommerce/trunk/bigcommerce.php
r2995239 r3010297 4 4 Description: Scale your ecommerce business with WordPress on the front-end and BigCommerce on the back end. Free up server resources from things like catalog management, processing payments, and managing fulfillment logistics. 5 5 Author: BigCommerce 6 Version: 5.0. 66 Version: 5.0.7 7 7 Author URI: https://www.bigcommerce.com/wordpress 8 8 Requires PHP: 7.4.0 -
bigcommerce/trunk/build-timestamp.php
r2995239 r3010297 1 1 <?php 2 define('BIGCOMMERCE_ASSETS_BUILD_TIMESTAMP', ' 9.18.11.13.2023');2 define('BIGCOMMERCE_ASSETS_BUILD_TIMESTAMP', '11.48.12.14.2023'); -
bigcommerce/trunk/src/BigCommerce/Logging/Error_Log.php
r2865940 r3010297 154 154 */ 155 155 private function write_htaccess( $directory_path ) { 156 $htaccess_file = fopen( $directory_path . " .htaccess", "a+" );156 $htaccess_file = fopen( $directory_path . "/.htaccess", "a+" ); 157 157 158 158 $rulles = <<<HTACCESS -
bigcommerce/trunk/src/BigCommerce/Plugin.php
r2995239 r3010297 5 5 6 6 class Plugin { 7 const VERSION = '5.0. 6';7 const VERSION = '5.0.7'; 8 8 9 9 protected static $_instance; -
bigcommerce/trunk/vendor/autoload.php
r2975364 r3010297 3 3 // autoload.php @generated by Composer 4 4 5 if (PHP_VERSION_ID < 50600) { 6 if (!headers_sent()) { 7 header('HTTP/1.1 500 Internal Server Error'); 8 } 9 $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 10 if (!ini_get('display_errors')) { 11 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 12 fwrite(STDERR, $err); 13 } elseif (!headers_sent()) { 14 echo $err; 15 } 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 21 } 22 5 23 require_once __DIR__ . '/composer/autoload_real.php'; 6 24 -
bigcommerce/trunk/vendor/composer/ClassLoader.php
r2975364 r3010297 38 38 * @author Fabien Potencier <fabien@symfony.com> 39 39 * @author Jordi Boggiano <j.boggiano@seld.be> 40 * @see http ://www.php-fig.org/psr/psr-0/41 * @see http ://www.php-fig.org/psr/psr-4/40 * @see https://www.php-fig.org/psr/psr-0/ 41 * @see https://www.php-fig.org/psr/psr-4/ 42 42 */ 43 43 class ClassLoader 44 44 { 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 48 /** @var string|null */ 49 private $vendorDir; 50 45 51 // PSR-4 52 /** 53 * @var array<string, array<string, int>> 54 */ 46 55 private $prefixLengthsPsr4 = array(); 56 /** 57 * @var array<string, list<string>> 58 */ 47 59 private $prefixDirsPsr4 = array(); 60 /** 61 * @var list<string> 62 */ 48 63 private $fallbackDirsPsr4 = array(); 49 64 50 65 // PSR-0 66 /** 67 * List of PSR-0 prefixes 68 * 69 * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) 70 * 71 * @var array<string, array<string, list<string>>> 72 */ 51 73 private $prefixesPsr0 = array(); 74 /** 75 * @var list<string> 76 */ 52 77 private $fallbackDirsPsr0 = array(); 53 78 79 /** @var bool */ 54 80 private $useIncludePath = false; 81 82 /** 83 * @var array<string, string> 84 */ 55 85 private $classMap = array(); 86 87 /** @var bool */ 56 88 private $classMapAuthoritative = false; 89 90 /** 91 * @var array<string, bool> 92 */ 57 93 private $missingClasses = array(); 94 95 /** @var string|null */ 58 96 private $apcuPrefix; 59 97 98 /** 99 * @var array<string, self> 100 */ 101 private static $registeredLoaders = array(); 102 103 /** 104 * @param string|null $vendorDir 105 */ 106 public function __construct($vendorDir = null) 107 { 108 $this->vendorDir = $vendorDir; 109 self::initializeIncludeClosure(); 110 } 111 112 /** 113 * @return array<string, list<string>> 114 */ 60 115 public function getPrefixes() 61 116 { 62 117 if (!empty($this->prefixesPsr0)) { 63 return call_user_func_array('array_merge', $this->prefixesPsr0);118 return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); 64 119 } 65 120 … … 67 122 } 68 123 124 /** 125 * @return array<string, list<string>> 126 */ 69 127 public function getPrefixesPsr4() 70 128 { … … 72 130 } 73 131 132 /** 133 * @return list<string> 134 */ 74 135 public function getFallbackDirs() 75 136 { … … 77 138 } 78 139 140 /** 141 * @return list<string> 142 */ 79 143 public function getFallbackDirsPsr4() 80 144 { … … 82 146 } 83 147 148 /** 149 * @return array<string, string> Array of classname => path 150 */ 84 151 public function getClassMap() 85 152 { … … 88 155 89 156 /** 90 * @param array $classMap Class to filename map 157 * @param array<string, string> $classMap Class to filename map 158 * 159 * @return void 91 160 */ 92 161 public function addClassMap(array $classMap) … … 103 172 * appending or prepending to the ones previously set for this prefix. 104 173 * 105 * @param string $prefix The prefix 106 * @param array|string $paths The PSR-0 root directories 107 * @param bool $prepend Whether to prepend the directories 174 * @param string $prefix The prefix 175 * @param list<string>|string $paths The PSR-0 root directories 176 * @param bool $prepend Whether to prepend the directories 177 * 178 * @return void 108 179 */ 109 180 public function add($prefix, $paths, $prepend = false) 110 181 { 182 $paths = (array) $paths; 111 183 if (!$prefix) { 112 184 if ($prepend) { 113 185 $this->fallbackDirsPsr0 = array_merge( 114 (array)$paths,186 $paths, 115 187 $this->fallbackDirsPsr0 116 188 ); … … 118 190 $this->fallbackDirsPsr0 = array_merge( 119 191 $this->fallbackDirsPsr0, 120 (array)$paths192 $paths 121 193 ); 122 194 } … … 127 199 $first = $prefix[0]; 128 200 if (!isset($this->prefixesPsr0[$first][$prefix])) { 129 $this->prefixesPsr0[$first][$prefix] = (array)$paths;201 $this->prefixesPsr0[$first][$prefix] = $paths; 130 202 131 203 return; … … 133 205 if ($prepend) { 134 206 $this->prefixesPsr0[$first][$prefix] = array_merge( 135 (array)$paths,207 $paths, 136 208 $this->prefixesPsr0[$first][$prefix] 137 209 ); … … 139 211 $this->prefixesPsr0[$first][$prefix] = array_merge( 140 212 $this->prefixesPsr0[$first][$prefix], 141 (array)$paths213 $paths 142 214 ); 143 215 } … … 148 220 * appending or prepending to the ones previously set for this namespace. 149 221 * 150 * @param string $prefix The prefix/namespace, with trailing '\\'151 * @param array|string $paths The PSR-4 base directories152 * @param bool $prepend Whether to prepend the directories222 * @param string $prefix The prefix/namespace, with trailing '\\' 223 * @param list<string>|string $paths The PSR-4 base directories 224 * @param bool $prepend Whether to prepend the directories 153 225 * 154 226 * @throws \InvalidArgumentException 227 * 228 * @return void 155 229 */ 156 230 public function addPsr4($prefix, $paths, $prepend = false) 157 231 { 232 $paths = (array) $paths; 158 233 if (!$prefix) { 159 234 // Register directories for the root namespace. 160 235 if ($prepend) { 161 236 $this->fallbackDirsPsr4 = array_merge( 162 (array)$paths,237 $paths, 163 238 $this->fallbackDirsPsr4 164 239 ); … … 166 241 $this->fallbackDirsPsr4 = array_merge( 167 242 $this->fallbackDirsPsr4, 168 (array)$paths243 $paths 169 244 ); 170 245 } … … 176 251 } 177 252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 178 $this->prefixDirsPsr4[$prefix] = (array)$paths;253 $this->prefixDirsPsr4[$prefix] = $paths; 179 254 } elseif ($prepend) { 180 255 // Prepend directories for an already registered namespace. 181 256 $this->prefixDirsPsr4[$prefix] = array_merge( 182 (array)$paths,257 $paths, 183 258 $this->prefixDirsPsr4[$prefix] 184 259 ); … … 187 262 $this->prefixDirsPsr4[$prefix] = array_merge( 188 263 $this->prefixDirsPsr4[$prefix], 189 (array)$paths264 $paths 190 265 ); 191 266 } … … 196 271 * replacing any others previously set for this prefix. 197 272 * 198 * @param string $prefix The prefix 199 * @param array|string $paths The PSR-0 base directories 273 * @param string $prefix The prefix 274 * @param list<string>|string $paths The PSR-0 base directories 275 * 276 * @return void 200 277 */ 201 278 public function set($prefix, $paths) … … 212 289 * replacing any others previously set for this namespace. 213 290 * 214 * @param string $prefix The prefix/namespace, with trailing '\\'215 * @param array|string $paths The PSR-4 base directories291 * @param string $prefix The prefix/namespace, with trailing '\\' 292 * @param list<string>|string $paths The PSR-4 base directories 216 293 * 217 294 * @throws \InvalidArgumentException 295 * 296 * @return void 218 297 */ 219 298 public function setPsr4($prefix, $paths) … … 235 314 * 236 315 * @param bool $useIncludePath 316 * 317 * @return void 237 318 */ 238 319 public function setUseIncludePath($useIncludePath) … … 257 338 * 258 339 * @param bool $classMapAuthoritative 340 * 341 * @return void 259 342 */ 260 343 public function setClassMapAuthoritative($classMapAuthoritative) … … 277 360 * 278 361 * @param string|null $apcuPrefix 362 * 363 * @return void 279 364 */ 280 365 public function setApcuPrefix($apcuPrefix) … … 297 382 * 298 383 * @param bool $prepend Whether to prepend the autoloader or not 384 * 385 * @return void 299 386 */ 300 387 public function register($prepend = false) 301 388 { 302 389 spl_autoload_register(array($this, 'loadClass'), true, $prepend); 390 391 if (null === $this->vendorDir) { 392 return; 393 } 394 395 if ($prepend) { 396 self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; 397 } else { 398 unset(self::$registeredLoaders[$this->vendorDir]); 399 self::$registeredLoaders[$this->vendorDir] = $this; 400 } 303 401 } 304 402 305 403 /** 306 404 * Unregisters this instance as an autoloader. 405 * 406 * @return void 307 407 */ 308 408 public function unregister() 309 409 { 310 410 spl_autoload_unregister(array($this, 'loadClass')); 411 412 if (null !== $this->vendorDir) { 413 unset(self::$registeredLoaders[$this->vendorDir]); 414 } 311 415 } 312 416 … … 315 419 * 316 420 * @param string $class The name of the class 317 * @return bool|null True if loaded, null otherwise421 * @return true|null True if loaded, null otherwise 318 422 */ 319 423 public function loadClass($class) 320 424 { 321 425 if ($file = $this->findFile($class)) { 322 includeFile($file); 426 $includeFile = self::$includeFile; 427 $includeFile($file); 323 428 324 429 return true; 325 430 } 431 432 return null; 326 433 } 327 434 … … 368 475 } 369 476 477 /** 478 * Returns the currently registered loaders keyed by their corresponding vendor directories. 479 * 480 * @return array<string, self> 481 */ 482 public static function getRegisteredLoaders() 483 { 484 return self::$registeredLoaders; 485 } 486 487 /** 488 * @param string $class 489 * @param string $ext 490 * @return string|false 491 */ 370 492 private function findFileWithExtension($class, $ext) 371 493 { … … 433 555 return false; 434 556 } 557 558 /** 559 * @return void 560 */ 561 private static function initializeIncludeClosure() 562 { 563 if (self::$includeFile !== null) { 564 return; 565 } 566 567 /** 568 * Scope isolated include. 569 * 570 * Prevents access to $this/self from included files. 571 * 572 * @param string $file 573 * @return void 574 */ 575 self::$includeFile = \Closure::bind(static function($file) { 576 include $file; 577 }, null, null); 578 } 435 579 } 436 437 /**438 * Scope isolated include.439 *440 * Prevents access to $this/self from included files.441 */442 function includeFile($file)443 {444 include $file;445 } -
bigcommerce/trunk/vendor/composer/autoload_classmap.php
r2975364 r3010297 3 3 // autoload_classmap.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 … … 741 741 'BigCommerce\\Templates\\Address_New' => $baseDir . '/src/BigCommerce/Templates/Address_New.php', 742 742 'BigCommerce\\Templates\\Amp_Cart_Actions' => $baseDir . '/src/BigCommerce/Templates/Amp_Cart_Actions.php', 743 'BigCommerce\\Templates\\Amp_Cart_Items' => $baseDir . '/src/BigCommerce/Templates/Amp_Cart_items.php',744 743 'BigCommerce\\Templates\\Amp_Cart_Summary' => $baseDir . '/src/BigCommerce/Templates/Amp_Cart_Summary.php', 745 744 'BigCommerce\\Templates\\Body_Classes' => $baseDir . '/src/BigCommerce/Templates/Body_Classes.php', … … 956 955 'Bigcommerce\\Test\\Unit\\Api\\Resources\\SkuOptionTest' => $vendorDir . '/bigcommerce/api/test/Unit/Api/Resources/SkuOptionTest.php', 957 956 'Bigcommerce\\Test\\Unit\\Api\\Resources\\SkuTest' => $vendorDir . '/bigcommerce/api/test/Unit/Api/Resources/SkuTest.php', 958 'Bigcommerce\\Test\\Unit\\ConnectionTest' => $vendorDir . '/bigcommerce/api/test/Unit/Api/ConnectionTest.php', 959 'Bigcommerce\\Test\\Unit\\ErrorTest' => $vendorDir . '/bigcommerce/api/test/Unit/Api/ErrorTest.php', 957 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 960 958 'Dotenv\\Dotenv' => $vendorDir . '/vlucas/phpdotenv/src/Dotenv.php', 961 959 'Dotenv\\Exception\\ExceptionInterface' => $vendorDir . '/vlucas/phpdotenv/src/Exception/ExceptionInterface.php', -
bigcommerce/trunk/vendor/composer/autoload_files.php
r2975364 r3010297 3 3 // autoload_files.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
bigcommerce/trunk/vendor/composer/autoload_namespaces.php
r2975364 r3010297 3 3 // autoload_namespaces.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
bigcommerce/trunk/vendor/composer/autoload_psr4.php
r2975364 r3010297 3 3 // autoload_psr4.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
bigcommerce/trunk/vendor/composer/autoload_real.php
r2975364 r3010297 14 14 } 15 15 16 /** 17 * @return \Composer\Autoload\ClassLoader 18 */ 16 19 public static function getLoader() 17 20 { … … 20 23 } 21 24 25 require __DIR__ . '/platform_check.php'; 26 22 27 spl_autoload_register(array('ComposerAutoloaderInite3b7bc6dcf7f80d1326d7975fb9f5e3f', 'loadClassLoader'), true, true); 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader( );28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 24 29 spl_autoload_unregister(array('ComposerAutoloaderInite3b7bc6dcf7f80d1326d7975fb9f5e3f', 'loadClassLoader')); 25 30 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\ComposerStaticInite3b7bc6dcf7f80d1326d7975fb9f5e3f::getInitializer($loader)); 31 } else { 32 $classMap = require __DIR__ . '/autoload_classmap.php'; 33 if ($classMap) { 34 $loader->addClassMap($classMap); 35 } 36 } 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInite3b7bc6dcf7f80d1326d7975fb9f5e3f::getInitializer($loader)); 37 33 38 34 $loader->setClassMapAuthoritative(true); 39 35 $loader->register(true); 40 36 41 if ($useStaticLoader) { 42 $includeFiles = Composer\Autoload\ComposerStaticInite3b7bc6dcf7f80d1326d7975fb9f5e3f::$files; 43 } else { 44 $includeFiles = require __DIR__ . '/autoload_files.php'; 45 } 46 foreach ($includeFiles as $fileIdentifier => $file) { 47 composerRequiree3b7bc6dcf7f80d1326d7975fb9f5e3f($fileIdentifier, $file); 37 $filesToLoad = \Composer\Autoload\ComposerStaticInite3b7bc6dcf7f80d1326d7975fb9f5e3f::$files; 38 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 39 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { 40 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; 41 42 require $file; 43 } 44 }, null, null); 45 foreach ($filesToLoad as $fileIdentifier => $file) { 46 $requireFile($fileIdentifier, $file); 48 47 } 49 48 … … 51 50 } 52 51 } 53 54 function composerRequiree3b7bc6dcf7f80d1326d7975fb9f5e3f($fileIdentifier, $file)55 {56 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {57 require $file;58 59 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;60 }61 } -
bigcommerce/trunk/vendor/composer/autoload_static.php
r2975364 r3010297 824 824 'BigCommerce\\Templates\\Address_New' => __DIR__ . '/../..' . '/src/BigCommerce/Templates/Address_New.php', 825 825 'BigCommerce\\Templates\\Amp_Cart_Actions' => __DIR__ . '/../..' . '/src/BigCommerce/Templates/Amp_Cart_Actions.php', 826 'BigCommerce\\Templates\\Amp_Cart_Items' => __DIR__ . '/../..' . '/src/BigCommerce/Templates/Amp_Cart_items.php',827 826 'BigCommerce\\Templates\\Amp_Cart_Summary' => __DIR__ . '/../..' . '/src/BigCommerce/Templates/Amp_Cart_Summary.php', 828 827 'BigCommerce\\Templates\\Body_Classes' => __DIR__ . '/../..' . '/src/BigCommerce/Templates/Body_Classes.php', … … 1039 1038 'Bigcommerce\\Test\\Unit\\Api\\Resources\\SkuOptionTest' => __DIR__ . '/..' . '/bigcommerce/api/test/Unit/Api/Resources/SkuOptionTest.php', 1040 1039 'Bigcommerce\\Test\\Unit\\Api\\Resources\\SkuTest' => __DIR__ . '/..' . '/bigcommerce/api/test/Unit/Api/Resources/SkuTest.php', 1041 'Bigcommerce\\Test\\Unit\\ConnectionTest' => __DIR__ . '/..' . '/bigcommerce/api/test/Unit/Api/ConnectionTest.php', 1042 'Bigcommerce\\Test\\Unit\\ErrorTest' => __DIR__ . '/..' . '/bigcommerce/api/test/Unit/Api/ErrorTest.php', 1040 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 1043 1041 'Dotenv\\Dotenv' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Dotenv.php', 1044 1042 'Dotenv\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/ExceptionInterface.php',
Note: See TracChangeset
for help on using the changeset viewer.