From 4cc9d8b0851b280078cef662e8cf1298f621914a Mon Sep 17 00:00:00 2001 From: camer0n Date: Thu, 22 Jun 2023 09:47:35 -0700 Subject: [PATCH] Updated vendor packages: hybridauth/hybridauth (v3.8.2 => v3.9.0) ifsnop/mysqldump-php (v2.9 => v2.12) guzzlehttp/psr7 (1.9.0 => 1.9.1) matthiasmullie/minify (1.3.70 => 1.3.71) phpmailer/phpmailer (v6.7.1 => v6.8.0) --- composer.lock | 65 ++-- e107_handlers/vendor/autoload.php | 17 +- e107_handlers/vendor/composer/ClassLoader.php | 137 +++++---- .../vendor/composer/InstalledVersions.php | 31 +- .../vendor/composer/autoload_real.php | 27 +- e107_handlers/vendor/composer/installed.json | 77 +++-- e107_handlers/vendor/composer/installed.php | 44 +-- .../vendor/guzzlehttp/psr7/CHANGELOG.md | 6 + .../vendor/guzzlehttp/psr7/composer.json | 5 - .../guzzlehttp/psr7/src/MessageTrait.php | 13 +- .../vendor/hybridauth/hybridauth/README.md | 2 +- .../hybridauth/src/Adapter/OAuth2.php | 4 + .../hybridauth/src/Provider/AOLOpenID.php | 4 +- .../hybridauth/src/Provider/Apple.php | 51 +++- .../hybridauth/src/Provider/LinkedIn.php | 15 + .../hybridauth/src/Provider/Mastodon.php | 123 ++++++++ .../hybridauth/src/Provider/OpenID.php | 4 +- .../hybridauth/src/Provider/PaypalOpenID.php | 4 +- .../hybridauth/src/Provider/Seznam.php | 63 ++++ .../src/Provider/StackExchangeOpenID.php | 4 +- .../hybridauth/src/Provider/Steam.php | 4 +- .../vendor/ifsnop/mysqldump-php/README.md | 8 + .../src/Ifsnop/Mysqldump/Mysqldump.php | 279 ++++++++++-------- .../vendor/matthiasmullie/minify/src/CSS.php | 13 +- .../vendor/matthiasmullie/minify/src/JS.php | 23 +- .../matthiasmullie/minify/src/Minify.php | 43 +++ .../vendor/phpmailer/phpmailer/README.md | 2 +- .../vendor/phpmailer/phpmailer/VERSION | 2 +- .../phpmailer/language/phpmailer.lang-hi.php | 12 +- .../phpmailer/phpmailer/src/PHPMailer.php | 4 +- .../vendor/phpmailer/phpmailer/src/POP3.php | 2 +- .../vendor/phpmailer/phpmailer/src/SMTP.php | 10 +- e107_tests/tests/unit/e_user_providerTest.php | 2 +- 33 files changed, 715 insertions(+), 385 deletions(-) create mode 100644 e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Mastodon.php create mode 100644 e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Seznam.php diff --git a/composer.lock b/composer.lock index 11a343984..f66528b82 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "guzzlehttp/psr7", - "version": "1.9.0", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" + "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", - "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/e4490cabc77465aaee90b20cfc9a770f8c04be6b", + "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b", "shasum": "" }, "require": { @@ -36,11 +36,6 @@ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, "autoload": { "files": [ "src/functions_include.php" @@ -98,7 +93,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.9.0" + "source": "https://github.com/guzzle/psr7/tree/1.9.1" }, "funding": [ { @@ -114,20 +109,20 @@ "type": "tidelift" } ], - "time": "2022-06-20T21:43:03+00:00" + "time": "2023-04-17T16:00:37+00:00" }, { "name": "hybridauth/hybridauth", - "version": "v3.8.2", + "version": "v3.9.0", "source": { "type": "git", "url": "https://github.com/hybridauth/hybridauth.git", - "reference": "0d6e31482c544e5ed2bdc83bd3c033054129c482" + "reference": "a950212d2f52df5b0662cd520b0043c4ee6d0f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hybridauth/hybridauth/zipball/0d6e31482c544e5ed2bdc83bd3c033054129c482", - "reference": "0d6e31482c544e5ed2bdc83bd3c033054129c482", + "url": "https://api.github.com/repos/hybridauth/hybridauth/zipball/a950212d2f52df5b0662cd520b0043c4ee6d0f1b", + "reference": "a950212d2f52df5b0662cd520b0043c4ee6d0f1b", "shasum": "" }, "require": { @@ -174,22 +169,22 @@ "support": { "gitter": "https://gitter.im/hybridauth/hybridauth", "issues": "https://github.com/hybridauth/hybridauth/issues", - "source": "https://github.com/hybridauth/hybridauth/tree/v3.8.2" + "source": "https://github.com/hybridauth/hybridauth/tree/v3.9.0" }, - "time": "2022-08-18T19:48:17+00:00" + "time": "2023-03-12T09:30:26+00:00" }, { "name": "ifsnop/mysqldump-php", - "version": "v2.9", + "version": "v2.12", "source": { "type": "git", "url": "https://github.com/ifsnop/mysqldump-php.git", - "reference": "fc9c119fe5d70af9a685cad6a8ac612fd7589e25" + "reference": "2d3a43fc0c49f23bf7dee392b0dd1f8c799f89d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ifsnop/mysqldump-php/zipball/fc9c119fe5d70af9a685cad6a8ac612fd7589e25", - "reference": "fc9c119fe5d70af9a685cad6a8ac612fd7589e25", + "url": "https://api.github.com/repos/ifsnop/mysqldump-php/zipball/2d3a43fc0c49f23bf7dee392b0dd1f8c799f89d3", + "reference": "2d3a43fc0c49f23bf7dee392b0dd1f8c799f89d3", "shasum": "" }, "require": { @@ -233,9 +228,9 @@ ], "support": { "issues": "https://github.com/ifsnop/mysqldump-php/issues", - "source": "https://github.com/ifsnop/mysqldump-php/tree/master" + "source": "https://github.com/ifsnop/mysqldump-php/tree/v2.12" }, - "time": "2020-04-03T14:40:40+00:00" + "time": "2023-04-12T07:43:14+00:00" }, { "name": "intervention/image", @@ -323,16 +318,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.70", + "version": "1.3.71", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b" + "reference": "ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1", + "reference": "ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1", "shasum": "" }, "require": { @@ -382,7 +377,7 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.70" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.71" }, "funding": [ { @@ -390,7 +385,7 @@ "type": "github" } ], - "time": "2022-12-09T12:56:44+00:00" + "time": "2023-04-25T20:33:03+00:00" }, { "name": "matthiasmullie/path-converter", @@ -447,16 +442,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.7.1", + "version": "v6.8.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "49cd7ea3d2563f028d7811f06864a53b1f15ff55" + "reference": "df16b615e371d81fb79e506277faea67a1be18f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/49cd7ea3d2563f028d7811f06864a53b1f15ff55", - "reference": "49cd7ea3d2563f028d7811f06864a53b1f15ff55", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/df16b615e371d81fb79e506277faea67a1be18f1", + "reference": "df16b615e371d81fb79e506277faea67a1be18f1", "shasum": "" }, "require": { @@ -515,7 +510,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.7.1" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.8.0" }, "funding": [ { @@ -523,7 +518,7 @@ "type": "github" } ], - "time": "2022-12-08T13:30:06+00:00" + "time": "2023-03-06T14:43:22+00:00" }, { "name": "psr/http-message", diff --git a/e107_handlers/vendor/autoload.php b/e107_handlers/vendor/autoload.php index 012b9c1c7..2c645148e 100644 --- a/e107_handlers/vendor/autoload.php +++ b/e107_handlers/vendor/autoload.php @@ -3,8 +3,21 @@ // autoload.php @generated by Composer if (PHP_VERSION_ID < 50600) { - echo '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; - exit(1); + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + $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; + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, $err); + } elseif (!headers_sent()) { + echo $err; + } + } + trigger_error( + $err, + E_USER_ERROR + ); } require_once __DIR__ . '/composer/autoload_real.php'; diff --git a/e107_handlers/vendor/composer/ClassLoader.php b/e107_handlers/vendor/composer/ClassLoader.php index afef3fa2a..7824d8f7e 100644 --- a/e107_handlers/vendor/composer/ClassLoader.php +++ b/e107_handlers/vendor/composer/ClassLoader.php @@ -42,35 +42,37 @@ namespace Composer\Autoload; */ class ClassLoader { - /** @var ?string */ + /** @var \Closure(string):void */ + private static $includeFile; + + /** @var string|null */ private $vendorDir; // PSR-4 /** - * @var array[] - * @psalm-var array> + * @var array> */ private $prefixLengthsPsr4 = array(); /** - * @var array[] - * @psalm-var array> + * @var array> */ private $prefixDirsPsr4 = array(); /** - * @var array[] - * @psalm-var array + * @var list */ private $fallbackDirsPsr4 = array(); // PSR-0 /** - * @var array[] - * @psalm-var array> + * List of PSR-0 prefixes + * + * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) + * + * @var array>> */ private $prefixesPsr0 = array(); /** - * @var array[] - * @psalm-var array + * @var list */ private $fallbackDirsPsr0 = array(); @@ -78,8 +80,7 @@ class ClassLoader private $useIncludePath = false; /** - * @var string[] - * @psalm-var array + * @var array */ private $classMap = array(); @@ -87,29 +88,29 @@ class ClassLoader private $classMapAuthoritative = false; /** - * @var bool[] - * @psalm-var array + * @var array */ private $missingClasses = array(); - /** @var ?string */ + /** @var string|null */ private $apcuPrefix; /** - * @var self[] + * @var array */ private static $registeredLoaders = array(); /** - * @param ?string $vendorDir + * @param string|null $vendorDir */ public function __construct($vendorDir = null) { $this->vendorDir = $vendorDir; + self::initializeIncludeClosure(); } /** - * @return string[] + * @return array> */ public function getPrefixes() { @@ -121,8 +122,7 @@ class ClassLoader } /** - * @return array[] - * @psalm-return array> + * @return array> */ public function getPrefixesPsr4() { @@ -130,8 +130,7 @@ class ClassLoader } /** - * @return array[] - * @psalm-return array + * @return list */ public function getFallbackDirs() { @@ -139,8 +138,7 @@ class ClassLoader } /** - * @return array[] - * @psalm-return array + * @return list */ public function getFallbackDirsPsr4() { @@ -148,8 +146,7 @@ class ClassLoader } /** - * @return string[] Array of classname => path - * @psalm-return array + * @return array Array of classname => path */ public function getClassMap() { @@ -157,8 +154,7 @@ class ClassLoader } /** - * @param string[] $classMap Class to filename map - * @psalm-param array $classMap + * @param array $classMap Class to filename map * * @return void */ @@ -175,24 +171,25 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, either * appending or prepending to the ones previously set for this prefix. * - * @param string $prefix The prefix - * @param string[]|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories * * @return void */ public function add($prefix, $paths, $prepend = false) { + $paths = (array) $paths; if (!$prefix) { if ($prepend) { $this->fallbackDirsPsr0 = array_merge( - (array) $paths, + $paths, $this->fallbackDirsPsr0 ); } else { $this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0, - (array) $paths + $paths ); } @@ -201,19 +198,19 @@ class ClassLoader $first = $prefix[0]; if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; + $this->prefixesPsr0[$first][$prefix] = $paths; return; } if ($prepend) { $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, + $paths, $this->prefixesPsr0[$first][$prefix] ); } else { $this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix], - (array) $paths + $paths ); } } @@ -222,9 +219,9 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, either * appending or prepending to the ones previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param string[]|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException * @@ -232,17 +229,18 @@ class ClassLoader */ public function addPsr4($prefix, $paths, $prepend = false) { + $paths = (array) $paths; if (!$prefix) { // Register directories for the root namespace. if ($prepend) { $this->fallbackDirsPsr4 = array_merge( - (array) $paths, + $paths, $this->fallbackDirsPsr4 ); } else { $this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4, - (array) $paths + $paths ); } } elseif (!isset($this->prefixDirsPsr4[$prefix])) { @@ -252,18 +250,18 @@ class ClassLoader throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; + $this->prefixDirsPsr4[$prefix] = $paths; } elseif ($prepend) { // Prepend directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, + $paths, $this->prefixDirsPsr4[$prefix] ); } else { // Append directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix], - (array) $paths + $paths ); } } @@ -272,8 +270,8 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, * replacing any others previously set for this prefix. * - * @param string $prefix The prefix - * @param string[]|string $paths The PSR-0 base directories + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 base directories * * @return void */ @@ -290,8 +288,8 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, * replacing any others previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param string[]|string $paths The PSR-4 base directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException * @@ -425,7 +423,8 @@ class ClassLoader public function loadClass($class) { if ($file = $this->findFile($class)) { - includeFile($file); + $includeFile = self::$includeFile; + $includeFile($file); return true; } @@ -476,9 +475,9 @@ class ClassLoader } /** - * Returns the currently registered loaders indexed by their corresponding vendor directories. + * Returns the currently registered loaders keyed by their corresponding vendor directories. * - * @return self[] + * @return array */ public static function getRegisteredLoaders() { @@ -555,18 +554,26 @@ class ClassLoader return false; } -} -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - * @private - */ -function includeFile($file) -{ - include $file; + /** + * @return void + */ + private static function initializeIncludeClosure() + { + if (self::$includeFile !== null) { + return; + } + + /** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + */ + self::$includeFile = \Closure::bind(static function($file) { + include $file; + }, null, null); + } } diff --git a/e107_handlers/vendor/composer/InstalledVersions.php b/e107_handlers/vendor/composer/InstalledVersions.php index 41bc143c1..51e734a77 100644 --- a/e107_handlers/vendor/composer/InstalledVersions.php +++ b/e107_handlers/vendor/composer/InstalledVersions.php @@ -28,7 +28,7 @@ class InstalledVersions { /** * @var mixed[]|null - * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null */ private static $installed; @@ -39,7 +39,7 @@ class InstalledVersions /** * @var array[] - * @psalm-var array}> + * @psalm-var array}> */ private static $installedByVendor = array(); @@ -98,7 +98,7 @@ class InstalledVersions { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); + return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; } } @@ -119,7 +119,7 @@ class InstalledVersions */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { - $constraint = $parser->parseConstraints($constraint); + $constraint = $parser->parseConstraints((string) $constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); @@ -243,7 +243,7 @@ class InstalledVersions /** * @return array - * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} */ public static function getRootPackage() { @@ -257,7 +257,7 @@ class InstalledVersions * * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @return array[] - * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} */ public static function getRawData() { @@ -280,7 +280,7 @@ class InstalledVersions * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ public static function getAllRawData() { @@ -303,7 +303,7 @@ class InstalledVersions * @param array[] $data A vendor/composer/installed.php data set * @return void * - * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data */ public static function reload($data) { @@ -313,7 +313,7 @@ class InstalledVersions /** * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ private static function getInstalled() { @@ -328,7 +328,9 @@ class InstalledVersions if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { - $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require $vendorDir.'/composer/installed.php'; + $installed[] = self::$installedByVendor[$vendorDir] = $required; if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { self::$installed = $installed[count($installed) - 1]; } @@ -340,12 +342,17 @@ class InstalledVersions // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = require __DIR__ . '/installed.php'; + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require __DIR__ . '/installed.php'; + self::$installed = $required; } else { self::$installed = array(); } } - $installed[] = self::$installed; + + if (self::$installed !== array()) { + $installed[] = self::$installed; + } return $installed; } diff --git a/e107_handlers/vendor/composer/autoload_real.php b/e107_handlers/vendor/composer/autoload_real.php index 146e2c7c9..11420a51f 100644 --- a/e107_handlers/vendor/composer/autoload_real.php +++ b/e107_handlers/vendor/composer/autoload_real.php @@ -31,25 +31,18 @@ class ComposerAutoloaderInit4ce406ae486ac58c9aa71537459207ae $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInit4ce406ae486ac58c9aa71537459207ae::$files; - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire4ce406ae486ac58c9aa71537459207ae($fileIdentifier, $file); + $filesToLoad = \Composer\Autoload\ComposerStaticInit4ce406ae486ac58c9aa71537459207ae::$files; + $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } + }, null, null); + foreach ($filesToLoad as $fileIdentifier => $file) { + $requireFile($fileIdentifier, $file); } return $loader; } } - -/** - * @param string $fileIdentifier - * @param string $file - * @return void - */ -function composerRequire4ce406ae486ac58c9aa71537459207ae($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - - require $file; - } -} diff --git a/e107_handlers/vendor/composer/installed.json b/e107_handlers/vendor/composer/installed.json index bc7774c19..fbbaef49b 100644 --- a/e107_handlers/vendor/composer/installed.json +++ b/e107_handlers/vendor/composer/installed.json @@ -2,17 +2,17 @@ "packages": [ { "name": "guzzlehttp/psr7", - "version": "1.9.0", - "version_normalized": "1.9.0.0", + "version": "1.9.1", + "version_normalized": "1.9.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" + "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", - "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/e4490cabc77465aaee90b20cfc9a770f8c04be6b", + "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b", "shasum": "" }, "require": { @@ -30,13 +30,8 @@ "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, - "time": "2022-06-20T21:43:03+00:00", + "time": "2023-04-17T16:00:37+00:00", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, "installation-source": "dist", "autoload": { "files": [ @@ -95,7 +90,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.9.0" + "source": "https://github.com/guzzle/psr7/tree/1.9.1" }, "funding": [ { @@ -115,17 +110,17 @@ }, { "name": "hybridauth/hybridauth", - "version": "v3.8.2", - "version_normalized": "3.8.2.0", + "version": "v3.9.0", + "version_normalized": "3.9.0.0", "source": { "type": "git", "url": "https://github.com/hybridauth/hybridauth.git", - "reference": "0d6e31482c544e5ed2bdc83bd3c033054129c482" + "reference": "a950212d2f52df5b0662cd520b0043c4ee6d0f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hybridauth/hybridauth/zipball/0d6e31482c544e5ed2bdc83bd3c033054129c482", - "reference": "0d6e31482c544e5ed2bdc83bd3c033054129c482", + "url": "https://api.github.com/repos/hybridauth/hybridauth/zipball/a950212d2f52df5b0662cd520b0043c4ee6d0f1b", + "reference": "a950212d2f52df5b0662cd520b0043c4ee6d0f1b", "shasum": "" }, "require": { @@ -139,7 +134,7 @@ "firebase/php-jwt": "Needed to support Apple provider", "phpseclib/phpseclib": "Needed to support Apple provider" }, - "time": "2022-08-18T19:48:17+00:00", + "time": "2023-03-12T09:30:26+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -174,23 +169,23 @@ "support": { "gitter": "https://gitter.im/hybridauth/hybridauth", "issues": "https://github.com/hybridauth/hybridauth/issues", - "source": "https://github.com/hybridauth/hybridauth/tree/v3.8.2" + "source": "https://github.com/hybridauth/hybridauth/tree/v3.9.0" }, "install-path": "../hybridauth/hybridauth" }, { "name": "ifsnop/mysqldump-php", - "version": "v2.9", - "version_normalized": "2.9.0.0", + "version": "v2.12", + "version_normalized": "2.12.0.0", "source": { "type": "git", "url": "https://github.com/ifsnop/mysqldump-php.git", - "reference": "fc9c119fe5d70af9a685cad6a8ac612fd7589e25" + "reference": "2d3a43fc0c49f23bf7dee392b0dd1f8c799f89d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ifsnop/mysqldump-php/zipball/fc9c119fe5d70af9a685cad6a8ac612fd7589e25", - "reference": "fc9c119fe5d70af9a685cad6a8ac612fd7589e25", + "url": "https://api.github.com/repos/ifsnop/mysqldump-php/zipball/2d3a43fc0c49f23bf7dee392b0dd1f8c799f89d3", + "reference": "2d3a43fc0c49f23bf7dee392b0dd1f8c799f89d3", "shasum": "" }, "require": { @@ -200,7 +195,7 @@ "phpunit/phpunit": "4.8.36", "squizlabs/php_codesniffer": "1.*" }, - "time": "2020-04-03T14:40:40+00:00", + "time": "2023-04-12T07:43:14+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -234,6 +229,10 @@ "php5", "sql" ], + "support": { + "issues": "https://github.com/ifsnop/mysqldump-php/issues", + "source": "https://github.com/ifsnop/mysqldump-php/tree/v2.12" + }, "install-path": "../ifsnop/mysqldump-php" }, { @@ -325,17 +324,17 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.70", - "version_normalized": "1.3.70.0", + "version": "1.3.71", + "version_normalized": "1.3.71.0", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b" + "reference": "ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1", + "reference": "ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1", "shasum": "" }, "require": { @@ -352,7 +351,7 @@ "suggest": { "psr/cache-implementation": "Cache implementation to use with Minify::cache" }, - "time": "2022-12-09T12:56:44+00:00", + "time": "2023-04-25T20:33:03+00:00", "bin": [ "bin/minifycss", "bin/minifyjs" @@ -387,7 +386,7 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.70" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.71" }, "funding": [ { @@ -455,17 +454,17 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.7.1", - "version_normalized": "6.7.1.0", + "version": "v6.8.0", + "version_normalized": "6.8.0.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "49cd7ea3d2563f028d7811f06864a53b1f15ff55" + "reference": "df16b615e371d81fb79e506277faea67a1be18f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/49cd7ea3d2563f028d7811f06864a53b1f15ff55", - "reference": "49cd7ea3d2563f028d7811f06864a53b1f15ff55", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/df16b615e371d81fb79e506277faea67a1be18f1", + "reference": "df16b615e371d81fb79e506277faea67a1be18f1", "shasum": "" }, "require": { @@ -494,7 +493,7 @@ "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)", "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication" }, - "time": "2022-12-08T13:30:06+00:00", + "time": "2023-03-06T14:43:22+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -526,7 +525,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.7.1" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.8.0" }, "funding": [ { diff --git a/e107_handlers/vendor/composer/installed.php b/e107_handlers/vendor/composer/installed.php index c922a1bc9..3959f1191 100644 --- a/e107_handlers/vendor/composer/installed.php +++ b/e107_handlers/vendor/composer/installed.php @@ -1,94 +1,94 @@ array( + 'name' => 'e107inc/e107', 'pretty_version' => 'dev-master', 'version' => 'dev-master', + 'reference' => '18eff9d77492b77f55a9f2d4ef824106b78c6800', 'type' => 'project', 'install_path' => __DIR__ . '/../../../', 'aliases' => array(), - 'reference' => '3f73b9cccafe3f7137ec2372de00b6322c496fbf', - 'name' => 'e107inc/e107', 'dev' => true, ), 'versions' => array( 'e107inc/e107' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', + 'reference' => '18eff9d77492b77f55a9f2d4ef824106b78c6800', 'type' => 'project', 'install_path' => __DIR__ . '/../../../', 'aliases' => array(), - 'reference' => '3f73b9cccafe3f7137ec2372de00b6322c496fbf', 'dev_requirement' => false, ), 'guzzlehttp/psr7' => array( - 'pretty_version' => '1.9.0', - 'version' => '1.9.0.0', + 'pretty_version' => '1.9.1', + 'version' => '1.9.1.0', + 'reference' => 'e4490cabc77465aaee90b20cfc9a770f8c04be6b', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), - 'reference' => 'e98e3e6d4f86621a9b75f623996e6bbdeb4b9318', 'dev_requirement' => false, ), 'hybridauth/hybridauth' => array( - 'pretty_version' => 'v3.8.2', - 'version' => '3.8.2.0', + 'pretty_version' => 'v3.9.0', + 'version' => '3.9.0.0', + 'reference' => 'a950212d2f52df5b0662cd520b0043c4ee6d0f1b', 'type' => 'library', 'install_path' => __DIR__ . '/../hybridauth/hybridauth', 'aliases' => array(), - 'reference' => '0d6e31482c544e5ed2bdc83bd3c033054129c482', 'dev_requirement' => false, ), 'ifsnop/mysqldump-php' => array( - 'pretty_version' => 'v2.9', - 'version' => '2.9.0.0', + 'pretty_version' => 'v2.12', + 'version' => '2.12.0.0', + 'reference' => '2d3a43fc0c49f23bf7dee392b0dd1f8c799f89d3', 'type' => 'library', 'install_path' => __DIR__ . '/../ifsnop/mysqldump-php', 'aliases' => array(), - 'reference' => 'fc9c119fe5d70af9a685cad6a8ac612fd7589e25', 'dev_requirement' => false, ), 'intervention/image' => array( 'pretty_version' => '2.7.2', 'version' => '2.7.2.0', + 'reference' => '04be355f8d6734c826045d02a1079ad658322dad', 'type' => 'library', 'install_path' => __DIR__ . '/../intervention/image', 'aliases' => array(), - 'reference' => '04be355f8d6734c826045d02a1079ad658322dad', 'dev_requirement' => false, ), 'matthiasmullie/minify' => array( - 'pretty_version' => '1.3.70', - 'version' => '1.3.70.0', + 'pretty_version' => '1.3.71', + 'version' => '1.3.71.0', + 'reference' => 'ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1', 'type' => 'library', 'install_path' => __DIR__ . '/../matthiasmullie/minify', 'aliases' => array(), - 'reference' => '2807d9f9bece6877577ad44acb5c801bb3ae536b', 'dev_requirement' => false, ), 'matthiasmullie/path-converter' => array( 'pretty_version' => '1.1.3', 'version' => '1.1.3.0', + 'reference' => 'e7d13b2c7e2f2268e1424aaed02085518afa02d9', 'type' => 'library', 'install_path' => __DIR__ . '/../matthiasmullie/path-converter', 'aliases' => array(), - 'reference' => 'e7d13b2c7e2f2268e1424aaed02085518afa02d9', 'dev_requirement' => false, ), 'phpmailer/phpmailer' => array( - 'pretty_version' => 'v6.7.1', - 'version' => '6.7.1.0', + 'pretty_version' => 'v6.8.0', + 'version' => '6.8.0.0', + 'reference' => 'df16b615e371d81fb79e506277faea67a1be18f1', 'type' => 'library', 'install_path' => __DIR__ . '/../phpmailer/phpmailer', 'aliases' => array(), - 'reference' => '49cd7ea3d2563f028d7811f06864a53b1f15ff55', 'dev_requirement' => false, ), 'psr/http-message' => array( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', + 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), - 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', 'dev_requirement' => false, ), 'psr/http-message-implementation' => array( @@ -100,10 +100,10 @@ 'ralouphie/getallheaders' => array( 'pretty_version' => '3.0.3', 'version' => '3.0.3.0', + 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'type' => 'library', 'install_path' => __DIR__ . '/../ralouphie/getallheaders', 'aliases' => array(), - 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'dev_requirement' => false, ), ), diff --git a/e107_handlers/vendor/guzzlehttp/psr7/CHANGELOG.md b/e107_handlers/vendor/guzzlehttp/psr7/CHANGELOG.md index b4fdf3c68..9b2b65cdb 100644 --- a/e107_handlers/vendor/guzzlehttp/psr7/CHANGELOG.md +++ b/e107_handlers/vendor/guzzlehttp/psr7/CHANGELOG.md @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## 1.9.1 - 2023-04-17 + +### Fixed + +- Fixed header validation issue + ## 1.9.0 - 2022-06-20 ### Added diff --git a/e107_handlers/vendor/guzzlehttp/psr7/composer.json b/e107_handlers/vendor/guzzlehttp/psr7/composer.json index 0e36920db..2607f22d4 100644 --- a/e107_handlers/vendor/guzzlehttp/psr7/composer.json +++ b/e107_handlers/vendor/guzzlehttp/psr7/composer.json @@ -61,11 +61,6 @@ "GuzzleHttp\\Tests\\Psr7\\": "tests/" } }, - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, "config": { "preferred-install": "dist", "sort-packages": true, diff --git a/e107_handlers/vendor/guzzlehttp/psr7/src/MessageTrait.php b/e107_handlers/vendor/guzzlehttp/psr7/src/MessageTrait.php index 0ac8663da..0bbd63e0d 100644 --- a/e107_handlers/vendor/guzzlehttp/psr7/src/MessageTrait.php +++ b/e107_handlers/vendor/guzzlehttp/psr7/src/MessageTrait.php @@ -226,12 +226,9 @@ trait MessageTrait throw new \InvalidArgumentException('Header name can not be empty.'); } - if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $header)) { + if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) { throw new \InvalidArgumentException( - sprintf( - '"%s" is not valid header name', - $header - ) + sprintf('"%s" is not valid header name.', $header) ); } } @@ -263,8 +260,10 @@ trait MessageTrait // Clients must not send a request with line folding and a server sending folded headers is // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting // folding is not likely to break any legitimate use case. - if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/', $value)) { - throw new \InvalidArgumentException(sprintf('"%s" is not valid header value', $value)); + if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) { + throw new \InvalidArgumentException( + sprintf('"%s" is not valid header value.', $value) + ); } } } diff --git a/e107_handlers/vendor/hybridauth/hybridauth/README.md b/e107_handlers/vendor/hybridauth/hybridauth/README.md index c7c7f2272..8498d2612 100644 --- a/e107_handlers/vendor/hybridauth/hybridauth/README.md +++ b/e107_handlers/vendor/hybridauth/hybridauth/README.md @@ -3,7 +3,7 @@ [![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://supportukrainenow.org/) -## [Hybridauth](https://hybridauth.github.io/) 3.8 +## [Hybridauth](https://hybridauth.github.io/) 3.9 [![Build Status](https://travis-ci.org/hybridauth/hybridauth.svg?branch=master)](https://travis-ci.org/hybridauth/hybridauth) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/hybridauth/hybridauth/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/hybridauth/hybridauth/?branch=master) [![Latest Stable Version](https://poser.pugx.org/hybridauth/hybridauth/v/stable.png)](https://packagist.org/packages/hybridauth/hybridauth) [![Join the chat at https://gitter.im/hybridauth/hybridauth](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hybridauth/hybridauth?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) diff --git a/e107_handlers/vendor/hybridauth/hybridauth/src/Adapter/OAuth2.php b/e107_handlers/vendor/hybridauth/hybridauth/src/Adapter/OAuth2.php index 06d495d92..e2aa05531 100644 --- a/e107_handlers/vendor/hybridauth/hybridauth/src/Adapter/OAuth2.php +++ b/e107_handlers/vendor/hybridauth/hybridauth/src/Adapter/OAuth2.php @@ -260,6 +260,10 @@ abstract class OAuth2 extends AbstractAdapter implements AdapterInterface if ($this->config->exists('tokens')) { $this->setAccessToken($this->config->get('tokens')); } + + if ($this->config->exists('supportRequestState')) { + $this->supportRequestState = $this->config->get('supportRequestState'); + } $this->setCallback($this->config->get('callback')); $this->setApiEndpoints($this->config->get('endpoints')); diff --git a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/AOLOpenID.php b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/AOLOpenID.php index 7391c8cf1..2af1785ea 100644 --- a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/AOLOpenID.php +++ b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/AOLOpenID.php @@ -7,12 +7,12 @@ namespace Hybridauth\Provider; -use Hybridauth\Adapter\OpenID as OpenIDAdapter; +use Hybridauth\Adapter\OpenID; /** * AOL OpenID provider adapter. */ -class AOLOpenID extends OpenIDAdapter +class AOLOpenID extends OpenID { /** * {@inheritdoc} diff --git a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Apple.php b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Apple.php index 7ea1a4bb6..016b276c7 100644 --- a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Apple.php +++ b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Apple.php @@ -10,6 +10,9 @@ namespace Hybridauth\Provider; use Composer\InstalledVersions; use Exception; use Firebase\JWT\ExpiredException; +use Hybridauth\Exception\HttpClientFailureException; +use Hybridauth\Exception\HttpRequestFailedException; +use Hybridauth\Exception\InvalidAccessTokenException; use Hybridauth\Exception\InvalidApplicationCredentialsException; use Hybridauth\Exception\UnexpectedValueException; @@ -112,6 +115,7 @@ class Apple extends OAuth2 /** * {@inheritdoc} + * @throws InvalidApplicationCredentialsException */ protected function configure() { @@ -161,6 +165,15 @@ class Apple extends OAuth2 return $collection; } + /** + * Get the user profile + * + * @throws HttpClientFailureException + * @throws InvalidAccessTokenException + * @throws UnexpectedValueException + * @throws HttpRequestFailedException + * @throws Exception + */ public function getUserProfile() { $id_token = $this->getStoredData('id_token'); @@ -196,7 +209,7 @@ class Apple extends OAuth2 ); $pem = $rsa->getPublicKey(); - $payload = ($this->getJwtVersion() < '6.2') ? + $payload = (version_compare($this->getJwtVersion(), '6.2') < 0) ? JWT::decode($id_token, $pem, ['RS256']) : JWT::decode($id_token, new Key($pem, 'RS256')); break; @@ -239,26 +252,35 @@ class Apple extends OAuth2 } /** + * Get the Apple secret as a JWT token + * * @return string secret token + * @throws InvalidApplicationCredentialsException */ private function getSecret() { // Your 10-character Team ID - if (!$team_id = $this->config->filter('keys')->get('team_id')) { + $team_id = $this->config->filter('keys')->get('team_id'); + + if (!$team_id) { throw new InvalidApplicationCredentialsException( 'Missing parameter team_id: your team id is required to generate the JWS token.' ); } // Your Services ID, e.g. com.aaronparecki.services - if (!$client_id = $this->config->filter('keys')->get('id') ?: $this->config->filter('keys')->get('key')) { + $client_id = $this->config->filter('keys')->get('id') ?: $this->config->filter('keys')->get('key'); + + if (!$client_id) { throw new InvalidApplicationCredentialsException( 'Missing parameter id: your client id is required to generate the JWS token.' ); } // Find the 10-char Key ID value from the portal - if (!$key_id = $this->config->filter('keys')->get('key_id')) { + $key_id = $this->config->filter('keys')->get('key_id'); + + if (!$key_id) { throw new InvalidApplicationCredentialsException( 'Missing parameter key_id: your key id is required to generate the JWS token.' ); @@ -269,7 +291,9 @@ class Apple extends OAuth2 // Save your private key from Apple in a file called `key.txt` if (!$key_content) { - if (!$key_file = $this->config->filter('keys')->get('key_file')) { + $key_file = $this->config->filter('keys')->get('key_file'); + + if (!$key_file) { throw new InvalidApplicationCredentialsException( 'Missing parameter key_content or key_file: your key is required to generate the JWS token.' ); @@ -292,13 +316,22 @@ class Apple extends OAuth2 'sub' => $client_id ]; - $secret = JWT::encode($data, $key_content, 'ES256', $key_id); - - return $secret; + return JWT::encode($data, $key_content, 'ES256', $key_id); } + /** + * Try to get the installed JWT version + * + * If composer 2 is installed use InstalledVersions::getVersion, + * otherwise return an empty string because no version check is available + * + * @return string|null + */ private function getJwtVersion() { - return InstalledVersions::getVersion('firebase/php-jwt'); + // assume old JWT version if no version check is possible because composer 1 is installed + return class_exists('Composer\InstalledVersions') ? + InstalledVersions::getVersion('firebase/php-jwt') : + ''; } } diff --git a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/LinkedIn.php b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/LinkedIn.php index b7968553e..35a7245a2 100644 --- a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/LinkedIn.php +++ b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/LinkedIn.php @@ -42,6 +42,21 @@ class LinkedIn extends OAuth2 */ protected $apiDocumentation = 'https://docs.microsoft.com/en-us/linkedin/shared/authentication/authentication'; + /** + * {@inheritdoc} + */ + protected function initialize() + { + parent::initialize(); + + if ($this->isRefreshTokenAvailable()) { + $this->tokenRefreshParameters += [ + 'client_id' => $this->clientId, + 'client_secret' => $this->clientSecret + ]; + } + } + /** * {@inheritdoc} */ diff --git a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Mastodon.php b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Mastodon.php new file mode 100644 index 000000000..d6e2c4259 --- /dev/null +++ b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Mastodon.php @@ -0,0 +1,123 @@ +config->exists('url')) { + throw new InvalidApplicationCredentialsException( + 'You must define a Mastodon instance url' + ); + } + $url = $this->config->get('url'); + + $this->apiBaseUrl = $url . '/api/v1'; + + $this->authorizeUrl = $url . '/oauth/authorize'; + $this->accessTokenUrl = $url . '/oauth/token'; + } + + /** + * {@inheritdoc} + */ + public function getUserProfile() + { + $response = $this->apiRequest('accounts/verify_credentials', 'GET', []); + + $data = new Data\Collection($response); + + if (!$data->exists('id') || !$data->get('id')) { + throw new UnexpectedApiResponseException( + 'Provider API returned an unexpected response.' + ); + } + + $userProfile = new Profile(); + + $userProfile->identifier = $data->get('id'); + $userProfile->displayName = $data->get('username'); + $userProfile->photoURL = + $data->get('avatar') ?: $data->get('avatar_static'); + $userProfile->webSiteURL = $data->get('url'); + $userProfile->description = $data->get('note'); + $userProfile->firstName = $data->get('display_name'); + + return $userProfile; + } + + public function setUserStatus($status) + { + // Prepare request parameters. + $params = []; + if (isset($status['message'])) { + $params['status'] = $status['message']; + } + + if (isset($status['picture'])) { + $headers = [ + 'Content-Type' => 'multipart/form-data', + ]; + + $pictures = $status['picture']; + + $ids = []; + + foreach ($pictures as $picture) { + $images = $this->apiRequest( + $this->config->get('url') . '/api/v2/media', + 'POST', + [ + 'file' => new \CurlFile( + $picture, + 'image/jpg', + 'filename' + ), + ], + $headers, + true + ); + + $ids[] = $images->id; + } + + $params['media_ids'] = $ids; + } + + $headers = [ + 'Content-Type' => 'application/json', + ]; + + $response = $this->apiRequest( + 'statuses', + 'POST', + $params, + $headers, + false + ); + + return $response; + } +} diff --git a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/OpenID.php b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/OpenID.php index 60ffb609f..d58a30d49 100644 --- a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/OpenID.php +++ b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/OpenID.php @@ -7,7 +7,7 @@ namespace Hybridauth\Provider; -use Hybridauth\Adapter\OpenID as OpenIDAdapter; +use Hybridauth\Adapter; /** * Generic OpenID providers adapter. @@ -39,6 +39,6 @@ use Hybridauth\Adapter\OpenID as OpenIDAdapter; * echo $e->getMessage() ; * } */ -class OpenID extends OpenIDAdapter +class OpenID extends Adapter\OpenID { } diff --git a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/PaypalOpenID.php b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/PaypalOpenID.php index a964ea863..9c455f82e 100644 --- a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/PaypalOpenID.php +++ b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/PaypalOpenID.php @@ -7,13 +7,13 @@ namespace Hybridauth\Provider; -use Hybridauth\Adapter\OpenID as OpenIDAdapter; +use Hybridauth\Adapter\OpenID; use Hybridauth\HttpClient; /** * PayPal OpenID provider adapter. */ -class PaypalOpenID extends OpenIDAdapter +class PaypalOpenID extends OpenID { /** * {@inheritdoc} diff --git a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Seznam.php b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Seznam.php new file mode 100644 index 000000000..73b4bd6ef --- /dev/null +++ b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Seznam.php @@ -0,0 +1,63 @@ +apiRequest('api/v1/user', 'GET', ['format' => 'json']); + + $data = new Data\Collection($response); + + if (!$data->exists('oauth_user_id')) { + throw new UnexpectedApiResponseException('Provider API returned an unexpected response.'); + } + + $userProfile = new User\Profile(); + + $userProfile->identifier = $data->get('oauth_user_id'); + $userProfile->email = $data->get('account_name'); + $userProfile->firstName = $data->get('firstname'); + $userProfile->lastName = $data->get('lastname'); + $userProfile->photoURL = $data->get('avatar_url'); + + return $userProfile; + } +} diff --git a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/StackExchangeOpenID.php b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/StackExchangeOpenID.php index fa63b4f19..4e8d5763e 100644 --- a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/StackExchangeOpenID.php +++ b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/StackExchangeOpenID.php @@ -7,12 +7,12 @@ namespace Hybridauth\Provider; -use Hybridauth\Adapter\OpenID as OpenIDAdapter; +use Hybridauth\Adapter\OpenID; /** * StackExchange OpenID provider adapter. */ -class StackExchangeOpenID extends OpenIDAdapter +class StackExchangeOpenID extends OpenID { /** * {@inheritdoc} diff --git a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Steam.php b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Steam.php index d041adb18..1288f0a74 100644 --- a/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Steam.php +++ b/e107_handlers/vendor/hybridauth/hybridauth/src/Provider/Steam.php @@ -7,7 +7,7 @@ namespace Hybridauth\Provider; -use Hybridauth\Adapter\OpenID as OpenIDAdapter; +use Hybridauth\Adapter\OpenID; use Hybridauth\Exception\UnexpectedApiResponseException; use Hybridauth\Data; use Hybridauth\User; @@ -32,7 +32,7 @@ use Hybridauth\User; * echo $e->getMessage() ; * } */ -class Steam extends OpenIDAdapter +class Steam extends OpenID { /** * {@inheritdoc} diff --git a/e107_handlers/vendor/ifsnop/mysqldump-php/README.md b/e107_handlers/vendor/ifsnop/mysqldump-php/README.md index ca2c8da67..aa940af34 100644 --- a/e107_handlers/vendor/ifsnop/mysqldump-php/README.md +++ b/e107_handlers/vendor/ifsnop/mysqldump-php/README.md @@ -33,6 +33,7 @@ MySQLDump-PHP is the only library that supports: * does insert-ignore, like a REPLACE but ignoring errors if a duplicate key exists. * modifying data from database on-the-fly when dumping, using hooks. * can save directly to google cloud storage over a compressed stream wrapper (GZIPSTREAM). +* can restore a dump from a file, when no mysql executable is available. ## Important @@ -172,6 +173,7 @@ $dumpSettingsDefault = array( 'compress' => Mysqldump::NONE, 'init_commands' => array(), 'no-data' => array(), + 'if-not-exists' => false, 'reset-auto-increment' => false, 'add-drop-database' => false, 'add-drop-table' => false, @@ -187,6 +189,7 @@ $dumpSettingsDefault = array( 'insert-ignore' => false, 'net_buffer_length' => self::MAXLINESIZE, 'no-autocommit' => true, + 'no-create-db' => false, 'no-create-info' => false, 'lock-tables' => true, 'routines' => false, @@ -220,6 +223,8 @@ $this->_dumpSettings = self::array_replace_recursive($dumpSettingsDefault, $dump - Exclude these tables (array of table names), include all if empty, supports regexps. - **include-views** - Only include these views (array of view names), include all if empty. By default, all views named as the include-tables array are included. +- **if-not-exists** + - Only create a new table when a table of the same name does not already exist. No error message is thrown if the table already exists. - **compress** - Gzip, Bzip2, None. - Could be specified using the declared consts: IMysqldump\Mysqldump::GZIP, IMysqldump\Mysqldump::BZIP2 or IMysqldump\Mysqldump::NONE @@ -260,6 +265,9 @@ $this->_dumpSettings = self::array_replace_recursive($dumpSettingsDefault, $dump - **no-autocommit** - Option to disable autocommit (faster inserts, no problems with index keys) - https://dev.mysql.com/doc/refman/4.1/en/commit.html +- **no-create-db** + - Option to disable the dump of create database statements. + - https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_no-create-db - **no-create-info** - https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_no-create-info - **no-data** diff --git a/e107_handlers/vendor/ifsnop/mysqldump-php/src/Ifsnop/Mysqldump/Mysqldump.php b/e107_handlers/vendor/ifsnop/mysqldump-php/src/Ifsnop/Mysqldump/Mysqldump.php index bd870ca21..0a2f2b7e1 100644 --- a/e107_handlers/vendor/ifsnop/mysqldump-php/src/Ifsnop/Mysqldump/Mysqldump.php +++ b/e107_handlers/vendor/ifsnop/mysqldump-php/src/Ifsnop/Mysqldump/Mysqldump.php @@ -43,6 +43,7 @@ class Mysqldump // List of available connection strings. const UTF8 = 'utf8'; const UTF8MB4 = 'utf8mb4'; + const BINARY = 'binary'; /** * Database username. @@ -75,12 +76,12 @@ class Mysqldump private $procedures = array(); private $functions = array(); private $events = array(); - private $dbHandler = null; + protected $dbHandler = null; private $dbType = ""; private $compressManager; private $typeAdapter; - private $dumpSettings = array(); - private $pdoSettings = array(); + protected $dumpSettings = array(); + protected $pdoSettings = array(); private $version; private $tableColumnTypes = array(); private $transformTableRowCallable; @@ -114,6 +115,48 @@ class Mysqldump private $tableWheres = array(); private $tableLimits = array(); + protected $dumpSettingsDefault = array( + 'include-tables' => array(), + 'exclude-tables' => array(), + 'include-views' => array(), + 'compress' => Mysqldump::NONE, + 'init_commands' => array(), + 'no-data' => array(), + 'if-not-exists' => false, + 'reset-auto-increment' => false, + 'add-drop-database' => false, + 'add-drop-table' => false, + 'add-drop-trigger' => true, + 'add-locks' => true, + 'complete-insert' => false, + 'databases' => false, + 'default-character-set' => Mysqldump::UTF8, + 'disable-keys' => true, + 'extended-insert' => true, + 'events' => false, + 'hex-blob' => true, /* faster than escaped content */ + 'insert-ignore' => false, + 'net_buffer_length' => self::MAXLINESIZE, + 'no-autocommit' => true, + 'no-create-db' => false, + 'no-create-info' => false, + 'lock-tables' => true, + 'routines' => false, + 'single-transaction' => true, + 'skip-triggers' => false, + 'skip-tz-utc' => false, + 'skip-comments' => false, + 'skip-dump-date' => false, + 'skip-definer' => false, + 'where' => '', + /* deprecated */ + 'disable-foreign-keys-check' => true + ); + + protected $pdoSettingsDefault = array( + PDO::ATTR_PERSISTENT => true, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + ); /** * Constructor of Mysqldump. Note that in the case of an SQLite database @@ -132,46 +175,6 @@ class Mysqldump $dumpSettings = array(), $pdoSettings = array() ) { - $dumpSettingsDefault = array( - 'include-tables' => array(), - 'exclude-tables' => array(), - 'include-views' => array(), - 'compress' => Mysqldump::NONE, - 'init_commands' => array(), - 'no-data' => array(), - 'reset-auto-increment' => false, - 'add-drop-database' => false, - 'add-drop-table' => false, - 'add-drop-trigger' => true, - 'add-locks' => true, - 'complete-insert' => false, - 'databases' => false, - 'default-character-set' => Mysqldump::UTF8, - 'disable-keys' => true, - 'extended-insert' => true, - 'events' => false, - 'hex-blob' => true, /* faster than escaped content */ - 'insert-ignore' => false, - 'net_buffer_length' => self::MAXLINESIZE, - 'no-autocommit' => true, - 'no-create-info' => false, - 'lock-tables' => true, - 'routines' => false, - 'single-transaction' => true, - 'skip-triggers' => false, - 'skip-tz-utc' => false, - 'skip-comments' => false, - 'skip-dump-date' => false, - 'skip-definer' => false, - 'where' => '', - /* deprecated */ - 'disable-foreign-keys-check' => true - ); - - $pdoSettingsDefault = array( - PDO::ATTR_PERSISTENT => true, - PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, - ); $this->user = $user; $this->pass = $pass; @@ -179,18 +182,18 @@ class Mysqldump // This drops MYSQL dependency, only use the constant if it's defined. if ("mysql" === $this->dbType) { - $pdoSettingsDefault[PDO::MYSQL_ATTR_USE_BUFFERED_QUERY] = false; + $this->pdoSettingsDefault[PDO::MYSQL_ATTR_USE_BUFFERED_QUERY] = false; } - $this->pdoSettings = self::array_replace_recursive($pdoSettingsDefault, $pdoSettings); - $this->dumpSettings = self::array_replace_recursive($dumpSettingsDefault, $dumpSettings); + $this->pdoSettings = array_replace_recursive($this->pdoSettingsDefault, $pdoSettings); + $this->dumpSettings = array_replace_recursive($this->dumpSettingsDefault, $dumpSettings); $this->dumpSettings['init_commands'][] = "SET NAMES ".$this->dumpSettings['default-character-set']; if (false === $this->dumpSettings['skip-tz-utc']) { $this->dumpSettings['init_commands'][] = "SET TIME_ZONE='+00:00'"; } - $diff = array_diff(array_keys($this->dumpSettings), array_keys($dumpSettingsDefault)); + $diff = array_diff(array_keys($this->dumpSettings), array_keys($this->dumpSettingsDefault)); if (count($diff) > 0) { throw new Exception("Unexpected value in dumpSettings: (".implode(",", $diff).")"); } @@ -217,31 +220,6 @@ class Mysqldump $this->dbHandler = null; } - /** - * Custom array_replace_recursive to be used if PHP < 5.3 - * Replaces elements from passed arrays into the first array recursively. - * - * @param array $array1 The array in which elements are replaced - * @param array $array2 The array from which elements will be extracted - * - * @return array Returns an array, or NULL if an error occurs. - */ - public static function array_replace_recursive($array1, $array2) - { - if (function_exists('array_replace_recursive')) { - return array_replace_recursive($array1, $array2); - } - - foreach ($array2 as $key => $value) { - if (is_array($value)) { - $array1[$key] = self::array_replace_recursive($array1[$key], $value); - } else { - $array1[$key] = $value; - } - } - return $array1; - } - /** * Keyed by table name, with the value as the conditions: * e.g. 'users' => 'date_registered > NOW() - INTERVAL 6 MONTH AND deleted=0' @@ -287,7 +265,7 @@ class Mysqldump */ public function getTableLimit($tableName) { - if (empty($this->tableLimits[$tableName])) { + if (!isset($this->tableLimits[$tableName])) { return false; } @@ -299,6 +277,46 @@ class Mysqldump return $limit; } + /** + * Import supplied SQL file + * @param string $path Absolute path to imported *.sql file + */ + public function restore($path) + { + if(!$path || !is_file($path)){ + throw new Exception("File {$path} does not exist."); + } + + $handle = fopen($path , 'rb'); + + if(!$handle){ + throw new Exception("Failed reading file {$path}. Check access permissions."); + } + + if(!$this->dbHandler){ + $this->connect(); + } + + $buffer = ''; + while ( !feof($handle) ) { + $line = trim(fgets($handle)); + + if (substr($line, 0, 2) == '--' || !$line) { + continue; // skip comments + } + + $buffer .= $line; + + // if it has a semicolon at the end, it's the end of the query + if (';' == substr(rtrim($line), -1, 1)) { + $this->dbHandler->exec($buffer); + $buffer = ''; + } + } + + fclose($handle); + } + /** * Parse DSN string and extract dbname value * Several examples of a DSN string @@ -350,7 +368,7 @@ class Mysqldump * * @return null */ - private function connect() + protected function connect() { // Connecting with PDO. try { @@ -415,6 +433,12 @@ class Mysqldump // Write some basic info to output file $this->compressManager->write($this->getDumpFileHeader()); + // initiate a transaction at global level to create a consistent snapshot + if ($this->dumpSettings['single-transaction']) { + $this->dbHandler->exec($this->typeAdapter->setup_transaction()); + $this->dbHandler->exec($this->typeAdapter->start_transaction()); + } + // Store server settings and use sanner defaults to dump $this->compressManager->write( $this->typeAdapter->backup_parameters() @@ -466,6 +490,12 @@ class Mysqldump $this->compressManager->write( $this->typeAdapter->restore_parameters() ); + + // end transaction + if ($this->dumpSettings['single-transaction']) { + $this->dbHandler->exec($this->typeAdapter->commit_transaction()); + } + // Write some stats to output file. $this->compressManager->write($this->getDumpFileFooter()); // Close output file. @@ -676,6 +706,8 @@ class Mysqldump */ private function exportTables() { + + // Exporting tables one by one foreach ($this->tables as $table) { if ($this->matches($table, $this->dumpSettings['exclude-tables'])) { @@ -845,7 +877,7 @@ class Mysqldump { if (!$this->dumpSettings['skip-comments']) { $ret = "--".PHP_EOL. - "-- Stand-In structure for view `${viewName}`".PHP_EOL. + "-- Stand-In structure for view `{$viewName}`".PHP_EOL. "--".PHP_EOL.PHP_EOL; $this->compressManager->write($ret); } @@ -877,7 +909,7 @@ class Mysqldump { $ret = array(); foreach ($this->tableColumnTypes[$viewName] as $k => $v) { - $ret[] = "`${k}` ${v['type_sql']}"; + $ret[] = "`{$k}` {$v['type_sql']}"; } $ret = implode(PHP_EOL.",", $ret); @@ -898,7 +930,7 @@ class Mysqldump { if (!$this->dumpSettings['skip-comments']) { $ret = "--".PHP_EOL. - "-- View structure for view `${viewName}`".PHP_EOL. + "-- View structure for view `{$viewName}`".PHP_EOL. "--".PHP_EOL.PHP_EOL; $this->compressManager->write($ret); } @@ -1052,7 +1084,7 @@ class Mysqldump return "NULL"; } elseif ($this->dumpSettings['hex-blob'] && $colType['is_blob']) { if ($colType['type'] == 'bit' || !empty($colValue)) { - return "0x${colValue}"; + return "0x{$colValue}"; } else { return "''"; } @@ -1133,7 +1165,7 @@ class Mysqldump $limit = $this->getTableLimit($tableName); - if ($limit) { + if ($limit !== false) { $stmt .= " LIMIT {$limit}"; } @@ -1198,11 +1230,6 @@ class Mysqldump ); } - if ($this->dumpSettings['single-transaction']) { - $this->dbHandler->exec($this->typeAdapter->setup_transaction()); - $this->dbHandler->exec($this->typeAdapter->start_transaction()); - } - if ($this->dumpSettings['lock-tables'] && !$this->dumpSettings['single-transaction']) { $this->typeAdapter->lock_table($tableName); } @@ -1251,10 +1278,6 @@ class Mysqldump ); } - if ($this->dumpSettings['single-transaction']) { - $this->dbHandler->exec($this->typeAdapter->commit_transaction()); - } - if ($this->dumpSettings['lock-tables'] && !$this->dumpSettings['single-transaction']) { $this->typeAdapter->unlock_table($tableName); } @@ -1289,15 +1312,17 @@ class Mysqldump { $colStmt = array(); foreach ($this->tableColumnTypes[$tableName] as $colName => $colType) { - if ($colType['type'] == 'bit' && $this->dumpSettings['hex-blob']) { - $colStmt[] = "LPAD(HEX(`${colName}`),2,'0') AS `${colName}`"; - } elseif ($colType['is_blob'] && $this->dumpSettings['hex-blob']) { - $colStmt[] = "HEX(`${colName}`) AS `${colName}`"; - } elseif ($colType['is_virtual']) { + if ($colType['is_virtual']) { $this->dumpSettings['complete-insert'] = true; continue; + } elseif ($colType['type'] == 'bit' && $this->dumpSettings['hex-blob']) { + $colStmt[] = "LPAD(HEX(`{$colName}`),2,'0') AS `{$colName}`"; + } elseif ($colType['type'] == 'double' && PHP_VERSION_ID > 80100) { + $colStmt[] = sprintf("CONCAT(`%s`) AS `%s`", $colName, $colName); + } elseif ($colType['is_blob'] && $this->dumpSettings['hex-blob']) { + $colStmt[] = "HEX(`{$colName}`) AS `{$colName}`"; } else { - $colStmt[] = "`${colName}`"; + $colStmt[] = "`{$colName}`"; } } @@ -1319,7 +1344,7 @@ class Mysqldump $this->dumpSettings['complete-insert'] = true; continue; } else { - $colNames[] = "`${colName}`"; + $colNames[] = "`{$colName}`"; } } return $colNames; @@ -1665,7 +1690,7 @@ abstract class TypeAdapterFactory $args = func_get_args(); - return "pragma table_info(${args[0]})"; + return "pragma table_info({$args[0]})"; } public function show_procedures() @@ -1835,6 +1860,10 @@ class TypeAdapterMysql extends TypeAdapterFactory public function databases() { + if ($this->dumpSettings['no-create-db']) { + return ""; + } + $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__); $args = func_get_args(); $databaseName = $args[0]; @@ -1848,10 +1877,10 @@ class TypeAdapterMysql extends TypeAdapterFactory $resultSet->closeCursor(); $ret = ""; - $ret .= "CREATE DATABASE /*!32312 IF NOT EXISTS*/ `${databaseName}`". - " /*!40100 DEFAULT CHARACTER SET ${characterSet} ". - " COLLATE ${collationDb} */;".PHP_EOL.PHP_EOL. - "USE `${databaseName}`;".PHP_EOL.PHP_EOL; + $ret .= "CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$databaseName}`". + " /*!40100 DEFAULT CHARACTER SET {$characterSet} ". + " COLLATE {$collationDb} */;".PHP_EOL.PHP_EOL. + "USE `{$databaseName}`;".PHP_EOL.PHP_EOL; return $ret; } @@ -1899,6 +1928,10 @@ class TypeAdapterMysql extends TypeAdapterFactory $createTable = preg_replace($match, $replace, $createTable); } + if ($this->dumpSettings['if-not-exists'] ) { + $createTable = preg_replace('/^CREATE TABLE/', 'CREATE TABLE IF NOT EXISTS', $createTable); + } + $ret = "/*!40101 SET @saved_cs_client = @@character_set_client */;".PHP_EOL. "/*!40101 SET character_set_client = ".$this->dumpSettings['default-character-set']." */;".PHP_EOL. $createTable.";".PHP_EOL. @@ -1920,7 +1953,7 @@ class TypeAdapterMysql extends TypeAdapterFactory if ($viewStmtReplaced = preg_replace( '/^(CREATE(?:\s+ALGORITHM=(?:UNDEFINED|MERGE|TEMPTABLE))?)\s+(' - .self::DEFINER_RE.'(?:\s+SQL SECURITY DEFINER|INVOKER)?)?\s+(VIEW .+)$/', + .self::DEFINER_RE.'(?:\s+SQL SECURITY (?:DEFINER|INVOKER))?)?\s+(VIEW .+)$/', '/*!50001 \1 */'.PHP_EOL.$definerStr.'/*!50001 \3 */', $viewStmt, 1 @@ -2088,7 +2121,8 @@ class TypeAdapterMysql extends TypeAdapterFactory $args = func_get_args(); return "SELECT TABLE_NAME AS tbl_name ". "FROM INFORMATION_SCHEMA.TABLES ". - "WHERE TABLE_TYPE='BASE TABLE' AND TABLE_SCHEMA='${args[0]}'"; + "WHERE TABLE_TYPE='BASE TABLE' AND TABLE_SCHEMA='{$args[0]}' ". + "ORDER BY TABLE_NAME"; } public function show_views() @@ -2097,21 +2131,22 @@ class TypeAdapterMysql extends TypeAdapterFactory $args = func_get_args(); return "SELECT TABLE_NAME AS tbl_name ". "FROM INFORMATION_SCHEMA.TABLES ". - "WHERE TABLE_TYPE='VIEW' AND TABLE_SCHEMA='${args[0]}'"; + "WHERE TABLE_TYPE='VIEW' AND TABLE_SCHEMA='{$args[0]}' ". + "ORDER BY TABLE_NAME"; } public function show_triggers() { $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__); $args = func_get_args(); - return "SHOW TRIGGERS FROM `${args[0]}`;"; + return "SHOW TRIGGERS FROM `{$args[0]}`;"; } public function show_columns() { $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__); $args = func_get_args(); - return "SHOW COLUMNS FROM `${args[0]}`;"; + return "SHOW COLUMNS FROM `{$args[0]}`;"; } public function show_procedures() @@ -2120,7 +2155,7 @@ class TypeAdapterMysql extends TypeAdapterFactory $args = func_get_args(); return "SELECT SPECIFIC_NAME AS procedure_name ". "FROM INFORMATION_SCHEMA.ROUTINES ". - "WHERE ROUTINE_TYPE='PROCEDURE' AND ROUTINE_SCHEMA='${args[0]}'"; + "WHERE ROUTINE_TYPE='PROCEDURE' AND ROUTINE_SCHEMA='{$args[0]}'"; } public function show_functions() @@ -2129,7 +2164,7 @@ class TypeAdapterMysql extends TypeAdapterFactory $args = func_get_args(); return "SELECT SPECIFIC_NAME AS function_name ". "FROM INFORMATION_SCHEMA.ROUTINES ". - "WHERE ROUTINE_TYPE='FUNCTION' AND ROUTINE_SCHEMA='${args[0]}'"; + "WHERE ROUTINE_TYPE='FUNCTION' AND ROUTINE_SCHEMA='{$args[0]}'"; } /** @@ -2144,7 +2179,7 @@ class TypeAdapterMysql extends TypeAdapterFactory $args = func_get_args(); return "SELECT EVENT_NAME AS event_name ". "FROM INFORMATION_SCHEMA.EVENTS ". - "WHERE EVENT_SCHEMA='${args[0]}'"; + "WHERE EVENT_SCHEMA='{$args[0]}'"; } public function setup_transaction() @@ -2168,7 +2203,7 @@ class TypeAdapterMysql extends TypeAdapterFactory { $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__); $args = func_get_args(); - return $this->dbHandler->exec("LOCK TABLES `${args[0]}` READ LOCAL"); + return $this->dbHandler->exec("LOCK TABLES `{$args[0]}` READ LOCAL"); } public function unlock_table() @@ -2180,7 +2215,7 @@ class TypeAdapterMysql extends TypeAdapterFactory { $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__); $args = func_get_args(); - return "LOCK TABLES `${args[0]}` WRITE;".PHP_EOL; + return "LOCK TABLES `{$args[0]}` WRITE;".PHP_EOL; } public function end_add_lock_table() @@ -2192,7 +2227,7 @@ class TypeAdapterMysql extends TypeAdapterFactory { $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__); $args = func_get_args(); - return "/*!40000 ALTER TABLE `${args[0]}` DISABLE KEYS */;". + return "/*!40000 ALTER TABLE `{$args[0]}` DISABLE KEYS */;". PHP_EOL; } @@ -2200,7 +2235,7 @@ class TypeAdapterMysql extends TypeAdapterFactory { $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__); $args = func_get_args(); - return "/*!40000 ALTER TABLE `${args[0]}` ENABLE KEYS */;". + return "/*!40000 ALTER TABLE `{$args[0]}` ENABLE KEYS */;". PHP_EOL; } @@ -2218,7 +2253,7 @@ class TypeAdapterMysql extends TypeAdapterFactory { $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__); $args = func_get_args(); - return "/*!40000 DROP DATABASE IF EXISTS `${args[0]}`*/;". + return "/*!40000 DROP DATABASE IF EXISTS `{$args[0]}`*/;". PHP_EOL.PHP_EOL; } @@ -2226,22 +2261,22 @@ class TypeAdapterMysql extends TypeAdapterFactory { $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__); $args = func_get_args(); - return "DROP TRIGGER IF EXISTS `${args[0]}`;".PHP_EOL; + return "DROP TRIGGER IF EXISTS `{$args[0]}`;".PHP_EOL; } public function drop_table() { $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__); $args = func_get_args(); - return "DROP TABLE IF EXISTS `${args[0]}`;".PHP_EOL; + return "DROP TABLE IF EXISTS `{$args[0]}`;".PHP_EOL; } public function drop_view() { $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__); $args = func_get_args(); - return "DROP TABLE IF EXISTS `${args[0]}`;".PHP_EOL. - "/*!50001 DROP VIEW IF EXISTS `${args[0]}`*/;".PHP_EOL; + return "DROP TABLE IF EXISTS `{$args[0]}`;".PHP_EOL. + "/*!50001 DROP VIEW IF EXISTS `{$args[0]}`*/;".PHP_EOL; } public function getDatabaseHeader() @@ -2249,7 +2284,7 @@ class TypeAdapterMysql extends TypeAdapterFactory $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__); $args = func_get_args(); return "--".PHP_EOL. - "-- Current Database: `${args[0]}`".PHP_EOL. + "-- Current Database: `{$args[0]}`".PHP_EOL. "--".PHP_EOL.PHP_EOL; } @@ -2294,6 +2329,10 @@ class TypeAdapterMysql extends TypeAdapterFactory "/*!40103 SET TIME_ZONE='+00:00' */;".PHP_EOL; } + if ($this->dumpSettings['no-autocommit']) { + $ret .= "/*!40101 SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT */;".PHP_EOL; + } + $ret .= "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;".PHP_EOL. "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;".PHP_EOL. "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;".PHP_EOL. @@ -2310,6 +2349,10 @@ class TypeAdapterMysql extends TypeAdapterFactory $ret .= "/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;".PHP_EOL; } + if ($this->dumpSettings['no-autocommit']) { + $ret .= "/*!40101 SET AUTOCOMMIT=@OLD_AUTOCOMMIT */;".PHP_EOL; + } + $ret .= "/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;".PHP_EOL. "/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;".PHP_EOL. "/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;".PHP_EOL. diff --git a/e107_handlers/vendor/matthiasmullie/minify/src/CSS.php b/e107_handlers/vendor/matthiasmullie/minify/src/CSS.php index a8bd1251a..09cedeee3 100644 --- a/e107_handlers/vendor/matthiasmullie/minify/src/CSS.php +++ b/e107_handlers/vendor/matthiasmullie/minify/src/CSS.php @@ -632,18 +632,7 @@ class CSS extends Minify */ protected function stripComments() { - // PHP only supports $this inside anonymous functions since 5.4 - $minifier = $this; - $callback = function ($match) use ($minifier) { - $count = count($minifier->extracted); - $placeholder = '/*' . $count . '*/'; - $minifier->extracted[$placeholder] = $match[0]; - - return $placeholder; - }; - $this->registerPattern('/\n?\/\*(!|.*?@license|.*?@preserve).*?\*\/\n?/s', $callback); - - $this->registerPattern('/\/\*.*?\*\//s', ''); + $this->stripMultilineComments(); } /** diff --git a/e107_handlers/vendor/matthiasmullie/minify/src/JS.php b/e107_handlers/vendor/matthiasmullie/minify/src/JS.php index ac5e98dd9..d592b08bb 100644 --- a/e107_handlers/vendor/matthiasmullie/minify/src/JS.php +++ b/e107_handlers/vendor/matthiasmullie/minify/src/JS.php @@ -198,28 +198,7 @@ class JS extends Minify */ protected function stripComments() { - // PHP only supports $this inside anonymous functions since 5.4 - $minifier = $this; - $callback = function ($match) use ($minifier) { - if ( - substr($match[2], 0, 1) === '!' || - strpos($match[2], '@license') !== false || - strpos($match[2], '@preserve') !== false - ) { - // preserve multi-line comments that start with /*! - // or contain @license or @preserve annotations - $count = count($minifier->extracted); - $placeholder = '/*' . $count . '*/'; - $minifier->extracted[$placeholder] = $match[0]; - - return $match[1] . $placeholder . $match[3]; - } - - return $match[1] . $match[3]; - }; - - // multi-line comments - $this->registerPattern('/(\n?)\/\*(.*?)\*\/(\n?)/s', $callback); + $this->stripMultilineComments(); // single-line comments $this->registerPattern('/\/\/.*$/m', ''); diff --git a/e107_handlers/vendor/matthiasmullie/minify/src/Minify.php b/e107_handlers/vendor/matthiasmullie/minify/src/Minify.php index 19faf9886..f77478beb 100644 --- a/e107_handlers/vendor/matthiasmullie/minify/src/Minify.php +++ b/e107_handlers/vendor/matthiasmullie/minify/src/Minify.php @@ -260,6 +260,49 @@ abstract class Minify $this->patterns[] = array($pattern, $replacement); } + /** + * Both JS and CSS use the same form of multi-line comment, so putting the common code here. + */ + protected function stripMultilineComments() + { + // First extract comments we want to keep, so they can be restored later + // PHP only supports $this inside anonymous functions since 5.4 + $minifier = $this; + $callback = function ($match) use ($minifier) { + $count = count($minifier->extracted); + $placeholder = '/*'.$count.'*/'; + $minifier->extracted[$placeholder] = $match[0]; + + return $placeholder; + }; + $this->registerPattern('/ + # optional newline + \n? + + # start comment + \/\* + + # comment content + (?: + # either starts with an ! + ! + | + # or, after some number of characters which do not end the comment + (?:(?!\*\/).)*? + + # there is either a @license or @preserve tag + @(?:license|preserve) + ) + + # then match to the end of the comment + .*?\*\/\n? + + /ixs', $callback); + + // Then strip all other comments + $this->registerPattern('/\/\*.*?\*\//s', ''); + } + /** * We can't "just" run some regular expressions against JavaScript: it's a * complex language. E.g. having an occurrence of // xyz would be a comment, diff --git a/e107_handlers/vendor/phpmailer/phpmailer/README.md b/e107_handlers/vendor/phpmailer/phpmailer/README.md index 3bba8262c..53e66f114 100644 --- a/e107_handlers/vendor/phpmailer/phpmailer/README.md +++ b/e107_handlers/vendor/phpmailer/phpmailer/README.md @@ -47,7 +47,7 @@ This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lg PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file: ```json -"phpmailer/phpmailer": "^6.7.1" +"phpmailer/phpmailer": "^6.8.0" ``` or run diff --git a/e107_handlers/vendor/phpmailer/phpmailer/VERSION b/e107_handlers/vendor/phpmailer/phpmailer/VERSION index 1d4202426..8a1c5c7e9 100644 --- a/e107_handlers/vendor/phpmailer/phpmailer/VERSION +++ b/e107_handlers/vendor/phpmailer/phpmailer/VERSION @@ -1 +1 @@ -6.7.1 \ No newline at end of file +6.8.0 \ No newline at end of file diff --git a/e107_handlers/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php b/e107_handlers/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php index d973a3596..d2856e057 100644 --- a/e107_handlers/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php +++ b/e107_handlers/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php @@ -4,24 +4,32 @@ * Hindi PHPMailer language file: refer to English translation for definitive list * @package PHPMailer * @author Yash Karanke + * Rewrite and extension of the work by Jayanti Suthar */ $PHPMAILER_LANG['authenticate'] = 'SMTP त्रुटि: प्रामाणिकता की जांच नहीं हो सका। '; +$PHPMAILER_LANG['buggy_php'] = 'PHP का आपका संस्करण एक बग से प्रभावित है जिसके परिणामस्वरूप संदेश दूषित हो सकते हैं. इसे ठीक करने हेतु, भेजने के लिए SMTP का उपयोग करे, अपने php.ini में mail.add_x_header विकल्प को अक्षम करें, MacOS या Linux पर जाए, या अपने PHP संस्करण को 7.0.17+ या 7.1.3+ बदले.'; $PHPMAILER_LANG['connect_host'] = 'SMTP त्रुटि: SMTP सर्वर से कनेक्ट नहीं हो सका। '; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP त्रुटि: डेटा स्वीकार नहीं किया जाता है। '; $PHPMAILER_LANG['empty_message'] = 'संदेश खाली है। '; $PHPMAILER_LANG['encoding'] = 'अज्ञात एन्कोडिंग प्रकार। '; $PHPMAILER_LANG['execute'] = 'आदेश को निष्पादित करने में विफल। '; +$PHPMAILER_LANG['extension_missing'] = 'एक्सटेन्षन गायब है: '; $PHPMAILER_LANG['file_access'] = 'फ़ाइल उपलब्ध नहीं है। '; $PHPMAILER_LANG['file_open'] = 'फ़ाइल त्रुटि: फाइल को खोला नहीं जा सका। '; $PHPMAILER_LANG['from_failed'] = 'प्रेषक का पता गलत है। '; $PHPMAILER_LANG['instantiate'] = 'मेल फ़ंक्शन कॉल नहीं कर सकता है।'; $PHPMAILER_LANG['invalid_address'] = 'पता गलत है। '; +$PHPMAILER_LANG['invalid_header'] = 'अमान्य हेडर नाम या मान'; +$PHPMAILER_LANG['invalid_hostentry'] = 'अमान्य hostentry: '; +$PHPMAILER_LANG['invalid_host'] = 'अमान्य होस्ट: '; $PHPMAILER_LANG['mailer_not_supported'] = 'मेल सर्वर के साथ काम नहीं करता है। '; $PHPMAILER_LANG['provide_address'] = 'आपको कम से कम एक प्राप्तकर्ता का ई-मेल पता प्रदान करना होगा।'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP त्रुटि: निम्न प्राप्तकर्ताओं को पते भेजने में विफल। '; -$PHPMAILER_LANG['signing'] = 'साइनअप त्रुटि:। '; +$PHPMAILER_LANG['signing'] = 'साइनअप त्रुटि: '; +$PHPMAILER_LANG['smtp_code'] = 'SMTP कोड: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'अतिरिक्त SMTP जानकारी: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP का connect () फ़ंक्शन विफल हुआ। '; +$PHPMAILER_LANG['smtp_detail'] = 'विवरण: '; $PHPMAILER_LANG['smtp_error'] = 'SMTP सर्वर त्रुटि। '; $PHPMAILER_LANG['variable_set'] = 'चर को बना या संशोधित नहीं किया जा सकता। '; -$PHPMAILER_LANG['extension_missing'] = 'एक्सटेन्षन गायब है: '; diff --git a/e107_handlers/vendor/phpmailer/phpmailer/src/PHPMailer.php b/e107_handlers/vendor/phpmailer/phpmailer/src/PHPMailer.php index e14cdbf57..a644d2cac 100644 --- a/e107_handlers/vendor/phpmailer/phpmailer/src/PHPMailer.php +++ b/e107_handlers/vendor/phpmailer/phpmailer/src/PHPMailer.php @@ -750,7 +750,7 @@ class PHPMailer * * @var string */ - const VERSION = '6.7.1'; + const VERSION = '6.8.0'; /** * Error severity: message only, continue processing. @@ -2423,7 +2423,7 @@ class PHPMailer */ public function addrFormat($addr) { - if (empty($addr[1])) { //No name provided + if (!isset($addr[1]) || ($addr[1] === '')) { //No name provided return $this->secureHeader($addr[0]); } diff --git a/e107_handlers/vendor/phpmailer/phpmailer/src/POP3.php b/e107_handlers/vendor/phpmailer/phpmailer/src/POP3.php index 4ae52fb19..d025689e8 100644 --- a/e107_handlers/vendor/phpmailer/phpmailer/src/POP3.php +++ b/e107_handlers/vendor/phpmailer/phpmailer/src/POP3.php @@ -46,7 +46,7 @@ class POP3 * * @var string */ - const VERSION = '6.7.1'; + const VERSION = '6.8.0'; /** * Default POP3 port number. diff --git a/e107_handlers/vendor/phpmailer/phpmailer/src/SMTP.php b/e107_handlers/vendor/phpmailer/phpmailer/src/SMTP.php index 95b0d0bb4..fc4b781a5 100644 --- a/e107_handlers/vendor/phpmailer/phpmailer/src/SMTP.php +++ b/e107_handlers/vendor/phpmailer/phpmailer/src/SMTP.php @@ -35,7 +35,7 @@ class SMTP * * @var string */ - const VERSION = '6.7.1'; + const VERSION = '6.8.0'; /** * SMTP line break constant. @@ -51,6 +51,13 @@ class SMTP */ const DEFAULT_PORT = 25; + /** + * The SMTPs port to use if one is not specified. + * + * @var int + */ + const DEFAULT_SECURE_PORT = 465; + /** * The maximum line length allowed by RFC 5321 section 4.5.3.1.6, * *excluding* a trailing CRLF break. @@ -187,6 +194,7 @@ class SMTP 'SendGrid' => '/[\d]{3} Ok: queued as (.*)/', 'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/', 'Haraka' => '/[\d]{3} Message Queued \((.*)\)/', + 'ZoneMTA' => '/[\d]{3} Message queued as (.*)/', 'Mailjet' => '/[\d]{3} OK queued as (.*)/', ]; diff --git a/e107_tests/tests/unit/e_user_providerTest.php b/e107_tests/tests/unit/e_user_providerTest.php index 21e8cac9c..bf41e8df6 100644 --- a/e107_tests/tests/unit/e_user_providerTest.php +++ b/e107_tests/tests/unit/e_user_providerTest.php @@ -35,7 +35,7 @@ class e_user_providerTest extends \Codeception\Test\Unit $this->assertIsArray($result); $this->assertContains("Facebook", $result); $this->assertContains("Twitter", $result); - $this->assertCount(48, $result, + $this->assertCount(50, $result, "The number of Hybridauth providers has changed! If this is intentional, note the change " . "in Hybridauth providers in the release changelog and update the count in this test." );