package updates

This commit is contained in:
nobody 2021-05-27 12:29:06 +10:00
parent 7f4e6c2b64
commit 4d05112375
55 changed files with 7008 additions and 2323 deletions

View file

@ -69,9 +69,6 @@
"config" : {
"notify-on-install" : false,
"optimize-autoloader" : true
},
"repositories": [{
"type": "vcs",
"url": "https://github.com/simplepie/simplepie"
}]
}
}

609
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -37,11 +37,13 @@ namespace Composer\Autoload;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
private $vendorDir;
// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
@ -57,10 +59,17 @@ class ClassLoader
private $missingClasses = array();
private $apcuPrefix;
private static $registeredLoaders = array();
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
@ -300,6 +309,15 @@ class ClassLoader
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
//no-op
} elseif ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
@ -308,6 +326,10 @@ class ClassLoader
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
@ -367,6 +389,16 @@ class ClassLoader
return $file;
}
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup

595
vendor/composer/InstalledVersions.php vendored Normal file
View file

@ -0,0 +1,595 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* To require it's presence, you can require `composer-runtime-api ^2.0`
*/
class InstalledVersions
{
private static $installed = array (
'root' =>
array (
'pretty_version' => 'dev-dev',
'version' => 'dev-dev',
'aliases' =>
array (
),
'reference' => '7f4e6c2b64be07ce7587dc906e1d65494121a534',
'name' => 'zot/zap',
),
'versions' =>
array (
'blueimp/jquery-file-upload' =>
array (
'pretty_version' => 'v10.31.0',
'version' => '10.31.0.0',
'aliases' =>
array (
),
'reference' => '0740f81829698b84efe17e72501e0f420ea0d611',
),
'bshaffer/oauth2-server-php' =>
array (
'pretty_version' => 'v1.11.1',
'version' => '1.11.1.0',
'aliases' =>
array (
),
'reference' => '5a0c8000d4763b276919e2106f54eddda6bc50fa',
),
'commerceguys/intl' =>
array (
'pretty_version' => 'v0.7.5',
'version' => '0.7.5.0',
'aliases' =>
array (
),
'reference' => 'de1435502068393fae4061818e194e4ea61b98d6',
),
'doctrine/collections' =>
array (
'pretty_version' => '1.6.7',
'version' => '1.6.7.0',
'aliases' =>
array (
),
'reference' => '55f8b799269a1a472457bd1a41b4f379d4cfba4a',
),
'ezyang/htmlpurifier' =>
array (
'pretty_version' => 'v4.13.0',
'version' => '4.13.0.0',
'aliases' =>
array (
),
'reference' => '08e27c97e4c6ed02f37c5b2b20488046c8d90d75',
),
'forkawesome/fork-awesome' =>
array (
'pretty_version' => '1.1.7',
'version' => '1.1.7.0',
'aliases' =>
array (
),
'reference' => '326af9c8bee0c80ff4c00cb2fadd4f1edd2a08c3',
),
'jbroadway/urlify' =>
array (
'pretty_version' => '1.2.2-stable',
'version' => '1.2.2.0',
'aliases' =>
array (
),
'reference' => '9b227e8548f16268cef55b5eb5d659a801fa824b',
),
'kzykhys/git' =>
array (
'pretty_version' => 'v0.1.2',
'version' => '0.1.2.0',
'aliases' =>
array (
),
'reference' => '3c4db987494c38eac300593719a4a7832abddadd',
),
'league/html-to-markdown' =>
array (
'pretty_version' => '4.10.0',
'version' => '4.10.0.0',
'aliases' =>
array (
),
'reference' => '0868ae7a552e809e5cd8f93ba022071640408e88',
),
'masterminds/html5' =>
array (
'pretty_version' => '2.7.4',
'version' => '2.7.4.0',
'aliases' =>
array (
),
'reference' => '9227822783c75406cfe400984b2f095cdf03d417',
),
'michelf/php-markdown' =>
array (
'pretty_version' => '1.9.0',
'version' => '1.9.0.0',
'aliases' =>
array (
),
'reference' => 'c83178d49e372ca967d1a8c77ae4e051b3a3c75c',
),
'p3k/emoji-detector' =>
array (
'pretty_version' => '0.2.1',
'version' => '0.2.1.0',
'aliases' =>
array (
),
'reference' => 'fb0765845e554f04ccd2b594a7ab8ca44d804bab',
),
'paragonie/random_compat' =>
array (
'pretty_version' => 'v9.99.99',
'version' => '9.99.99.0',
'aliases' =>
array (
),
'reference' => '84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95',
),
'phpseclib/phpseclib' =>
array (
'pretty_version' => '2.0.31',
'version' => '2.0.31.0',
'aliases' =>
array (
),
'reference' => '233a920cb38636a43b18d428f9a8db1f0a1a08f4',
),
'psr/log' =>
array (
'pretty_version' => '1.1.4',
'version' => '1.1.4.0',
'aliases' =>
array (
),
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
),
'ramsey/uuid' =>
array (
'pretty_version' => '3.9.3',
'version' => '3.9.3.0',
'aliases' =>
array (
),
'reference' => '7e1633a6964b48589b142d60542f9ed31bd37a92',
),
'rhumsaa/uuid' =>
array (
'replaced' =>
array (
0 => '3.9.3',
),
),
'sabre/dav' =>
array (
'pretty_version' => '3.2.3',
'version' => '3.2.3.0',
'aliases' =>
array (
),
'reference' => 'a9780ce4f35560ecbd0af524ad32d9d2c8954b80',
),
'sabre/event' =>
array (
'pretty_version' => '3.0.0',
'version' => '3.0.0.0',
'aliases' =>
array (
),
'reference' => '831d586f5a442dceacdcf5e9c4c36a4db99a3534',
),
'sabre/http' =>
array (
'pretty_version' => 'v4.2.4',
'version' => '4.2.4.0',
'aliases' =>
array (
),
'reference' => 'acccec4ba863959b2d10c1fa0fb902736c5c8956',
),
'sabre/uri' =>
array (
'pretty_version' => '1.2.1',
'version' => '1.2.1.0',
'aliases' =>
array (
),
'reference' => 'ada354d83579565949d80b2e15593c2371225e61',
),
'sabre/vobject' =>
array (
'pretty_version' => '4.2.2',
'version' => '4.2.2.0',
'aliases' =>
array (
),
'reference' => '449616b2d45b95c8973975de23f34a3d14f63b4b',
),
'sabre/xml' =>
array (
'pretty_version' => '1.5.1',
'version' => '1.5.1.0',
'aliases' =>
array (
),
'reference' => 'a367665f1df614c3b8fefc30a54de7cd295e444e',
),
'simshaun/recurr' =>
array (
'pretty_version' => 'v4.0.5',
'version' => '4.0.5.0',
'aliases' =>
array (
),
'reference' => '08b0b46879f598cd11dd42b4c1a9c221a0562749',
),
'smarty/smarty' =>
array (
'pretty_version' => 'v3.1.39',
'version' => '3.1.39.0',
'aliases' =>
array (
),
'reference' => 'e27da524f7bcd7361e3ea5cdfa99c4378a7b5419',
),
'symfony/deprecation-contracts' =>
array (
'pretty_version' => 'v2.4.0',
'version' => '2.4.0.0',
'aliases' =>
array (
),
'reference' => '5f38c8804a9e97d23e0c8d63341088cd8a22d627',
),
'symfony/options-resolver' =>
array (
'pretty_version' => 'v5.2.4',
'version' => '5.2.4.0',
'aliases' =>
array (
),
'reference' => '5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce',
),
'symfony/polyfill-ctype' =>
array (
'pretty_version' => 'v1.22.1',
'version' => '1.22.1.0',
'aliases' =>
array (
),
'reference' => 'c6c942b1ac76c82448322025e084cadc56048b4e',
),
'symfony/polyfill-php73' =>
array (
'pretty_version' => 'v1.22.1',
'version' => '1.22.1.0',
'aliases' =>
array (
),
'reference' => 'a678b42e92f86eca04b7fa4c0f6f19d097fb69e2',
),
'symfony/polyfill-php80' =>
array (
'pretty_version' => 'v1.22.1',
'version' => '1.22.1.0',
'aliases' =>
array (
),
'reference' => 'dc3063ba22c2a1fd2f45ed856374d79114998f91',
),
'symfony/process' =>
array (
'pretty_version' => 'v5.2.7',
'version' => '5.2.7.0',
'aliases' =>
array (
),
'reference' => '98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e',
),
'twbs/bootstrap' =>
array (
'pretty_version' => 'v4.1.3',
'version' => '4.1.3.0',
'aliases' =>
array (
),
'reference' => '3b558734382ce58b51e5fc676453bfd53bba9201',
),
'twitter/bootstrap' =>
array (
'replaced' =>
array (
0 => 'v4.1.3',
),
),
'voku/portable-ascii' =>
array (
'pretty_version' => '1.5.6',
'version' => '1.5.6.0',
'aliases' =>
array (
),
'reference' => '80953678b19901e5165c56752d087fc11526017c',
),
'voku/stop-words' =>
array (
'pretty_version' => '2.0.1',
'version' => '2.0.1.0',
'aliases' =>
array (
),
'reference' => '8e63c0af20f800b1600783764e0ce19e53969f71',
),
'zot/zap' =>
array (
'pretty_version' => 'dev-dev',
'version' => 'dev-dev',
'aliases' =>
array (
),
'reference' => '7f4e6c2b64be07ce7587dc906e1d65494121a534',
),
),
);
private static $canGetVendors;
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @return bool
*/
public static function isInstalled($packageName)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return true;
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
*
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @return array[]
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: list<string, array{pretty_version: ?string, version: ?string, aliases: ?string[], reference: ?string, replaced: ?string[], provided: ?string[]}>}
*/
public static function getRawData()
{
return self::$installed;
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @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[]}, versions: list<string, array{pretty_version: ?string, version: ?string, aliases: ?string[], reference: ?string, replaced: ?string[], provided: ?string[]}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
/**
* @return array[]
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
// @phpstan-ignore-next-line
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
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';
}
}
}
$installed[] = self::$installed;
return $installed;
}
}

View file

@ -37,6 +37,7 @@ return array(
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatInterface' => $vendorDir . '/commerceguys/intl/src/NumberFormat/NumberFormatInterface.php',
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatRepository' => $vendorDir . '/commerceguys/intl/src/NumberFormat/NumberFormatRepository.php',
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatRepositoryInterface' => $vendorDir . '/commerceguys/intl/src/NumberFormat/NumberFormatRepositoryInterface.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Doctrine\\Common\\Collections\\AbstractLazyCollection' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php',
'Doctrine\\Common\\Collections\\ArrayCollection' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php',
'Doctrine\\Common\\Collections\\Collection' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php',
@ -227,9 +228,6 @@ return array(
'HTMLPurifier_Printer' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer.php',
'HTMLPurifier_Printer_CSSDefinition' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php',
'HTMLPurifier_Printer_ConfigForm' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
'HTMLPurifier_Printer_ConfigForm_NullDecorator' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
'HTMLPurifier_Printer_ConfigForm_bool' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
'HTMLPurifier_Printer_ConfigForm_default' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
'HTMLPurifier_Printer_HTMLDefinition' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php',
'HTMLPurifier_PropertyList' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/PropertyList.php',
'HTMLPurifier_PropertyListIterator' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php',
@ -437,6 +435,9 @@ return array(
'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php',
'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php',
'Ramsey\\Uuid\\BinaryUtils' => $vendorDir . '/ramsey/uuid/src/BinaryUtils.php',
'Ramsey\\Uuid\\Builder\\DefaultUuidBuilder' => $vendorDir . '/ramsey/uuid/src/Builder/DefaultUuidBuilder.php',
'Ramsey\\Uuid\\Builder\\DegradedUuidBuilder' => $vendorDir . '/ramsey/uuid/src/Builder/DegradedUuidBuilder.php',
@ -1066,6 +1067,7 @@ return array(
'Zotlabs\\Daemon\\Addon' => $baseDir . '/Zotlabs/Daemon/Addon.php',
'Zotlabs\\Daemon\\CacheThumb' => $baseDir . '/Zotlabs/Daemon/CacheThumb.php',
'Zotlabs\\Daemon\\Cache_embeds' => $baseDir . '/Zotlabs/Daemon/Cache_embeds.php',
'Zotlabs\\Daemon\\Cache_image' => $baseDir . '/Zotlabs/Daemon/Cache_image.php',
'Zotlabs\\Daemon\\Channel_purge' => $baseDir . '/Zotlabs/Daemon/Channel_purge.php',
'Zotlabs\\Daemon\\Checksites' => $baseDir . '/Zotlabs/Daemon/Checksites.php',
'Zotlabs\\Daemon\\Content_importer' => $baseDir . '/Zotlabs/Daemon/Content_importer.php',
@ -1141,7 +1143,6 @@ return array(
'Zotlabs\\Lib\\Share' => $baseDir . '/Zotlabs/Lib/Share.php',
'Zotlabs\\Lib\\SvgSanitizer' => $baseDir . '/Zotlabs/Lib/SvgSanitizer.php',
'Zotlabs\\Lib\\System' => $baseDir . '/Zotlabs/Lib/System.php',
'Zotlabs\\Lib\\TableConverter' => $baseDir . '/Zotlabs/Lib/Markdown.php',
'Zotlabs\\Lib\\ThreadItem' => $baseDir . '/Zotlabs/Lib/ThreadItem.php',
'Zotlabs\\Lib\\ThreadListener' => $baseDir . '/Zotlabs/Lib/ThreadListener.php',
'Zotlabs\\Lib\\ThreadStream' => $baseDir . '/Zotlabs/Lib/ThreadStream.php',
@ -1168,6 +1169,7 @@ return array(
'Zotlabs\\Module\\Admin\\Site' => $baseDir . '/Zotlabs/Module/Admin/Site.php',
'Zotlabs\\Module\\Admin\\Themes' => $baseDir . '/Zotlabs/Module/Admin/Themes.php',
'Zotlabs\\Module\\Affinity' => $baseDir . '/Zotlabs/Module/Affinity.php',
'Zotlabs\\Module\\Album' => $baseDir . '/Zotlabs/Module/Album.php',
'Zotlabs\\Module\\Ap_probe' => $baseDir . '/Zotlabs/Module/Ap_probe.php',
'Zotlabs\\Module\\Api' => $baseDir . '/Zotlabs/Module/Api.php',
'Zotlabs\\Module\\Appman' => $baseDir . '/Zotlabs/Module/Appman.php',
@ -1200,6 +1202,7 @@ return array(
'Zotlabs\\Module\\Connedit' => $baseDir . '/Zotlabs/Module/Connedit.php',
'Zotlabs\\Module\\Contactgroup' => $baseDir . '/Zotlabs/Module/Contactgroup.php',
'Zotlabs\\Module\\Content_filter' => $baseDir . '/Zotlabs/Module/Content_filter.php',
'Zotlabs\\Module\\Conversation' => $baseDir . '/Zotlabs/Module/Conversation.php',
'Zotlabs\\Module\\Cover_photo' => $baseDir . '/Zotlabs/Module/Cover_photo.php',
'Zotlabs\\Module\\Dav' => $baseDir . '/Zotlabs/Module/Dav.php',
'Zotlabs\\Module\\Defperms' => $baseDir . '/Zotlabs/Module/Defperms.php',
@ -1631,6 +1634,7 @@ return array(
'Zotlabs\\Update\\_1245' => $baseDir . '/Zotlabs/Update/_1245.php',
'Zotlabs\\Update\\_1246' => $baseDir . '/Zotlabs/Update/_1246.php',
'Zotlabs\\Update\\_1247' => $baseDir . '/Zotlabs/Update/_1247.php',
'Zotlabs\\Update\\_1248' => $baseDir . '/Zotlabs/Update/_1248.php',
'Zotlabs\\Web\\Controller' => $baseDir . '/Zotlabs/Web/Controller.php',
'Zotlabs\\Web\\HTTPHeaders' => $baseDir . '/Zotlabs/Web/HTTPHeaders.php',
'Zotlabs\\Web\\HTTPSig' => $baseDir . '/Zotlabs/Web/HTTPSig.php',

View file

@ -13,12 +13,12 @@ return array(
'a1cce3d26cc15c00fcd0b3354bd72c88' => $vendorDir . '/sabre/event/lib/Promise/functions.php',
'3569eecfeed3bcf0bad3c998a494ecb8' => $vendorDir . '/sabre/xml/lib/Deserializer/functions.php',
'93aa591bc4ca510c520999e34229ee79' => $vendorDir . '/sabre/xml/lib/Serializer/functions.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'ebdb698ed4152ae445614b69b5e4bb6a' => $vendorDir . '/sabre/http/lib/functions.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
'd08bec471a180204a14ef3c91e951f99' => $vendorDir . '/p3k/emoji-detector/src/Emoji.php',
'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php',
'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
);

View file

@ -22,13 +22,15 @@ class ComposerAutoloaderInit7b34d7e50a62201ec5d5e526a5b8b35d
return self::$loader;
}
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit7b34d7e50a62201ec5d5e526a5b8b35d', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit7b34d7e50a62201ec5d5e526a5b8b35d', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d::getInitializer($loader));
} else {

View file

@ -14,14 +14,14 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'a1cce3d26cc15c00fcd0b3354bd72c88' => __DIR__ . '/..' . '/sabre/event/lib/Promise/functions.php',
'3569eecfeed3bcf0bad3c998a494ecb8' => __DIR__ . '/..' . '/sabre/xml/lib/Deserializer/functions.php',
'93aa591bc4ca510c520999e34229ee79' => __DIR__ . '/..' . '/sabre/xml/lib/Serializer/functions.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'ebdb698ed4152ae445614b69b5e4bb6a' => __DIR__ . '/..' . '/sabre/http/lib/functions.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
'd08bec471a180204a14ef3c91e951f99' => __DIR__ . '/..' . '/p3k/emoji-detector/src/Emoji.php',
'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php',
'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
);
public static $prefixLengthsPsr4 = array (
@ -254,6 +254,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatInterface' => __DIR__ . '/..' . '/commerceguys/intl/src/NumberFormat/NumberFormatInterface.php',
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatRepository' => __DIR__ . '/..' . '/commerceguys/intl/src/NumberFormat/NumberFormatRepository.php',
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatRepositoryInterface' => __DIR__ . '/..' . '/commerceguys/intl/src/NumberFormat/NumberFormatRepositoryInterface.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Doctrine\\Common\\Collections\\AbstractLazyCollection' => __DIR__ . '/..' . '/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php',
'Doctrine\\Common\\Collections\\ArrayCollection' => __DIR__ . '/..' . '/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php',
'Doctrine\\Common\\Collections\\Collection' => __DIR__ . '/..' . '/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php',
@ -444,9 +445,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'HTMLPurifier_Printer' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer.php',
'HTMLPurifier_Printer_CSSDefinition' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php',
'HTMLPurifier_Printer_ConfigForm' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
'HTMLPurifier_Printer_ConfigForm_NullDecorator' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
'HTMLPurifier_Printer_ConfigForm_bool' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
'HTMLPurifier_Printer_ConfigForm_default' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php',
'HTMLPurifier_Printer_HTMLDefinition' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php',
'HTMLPurifier_PropertyList' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/PropertyList.php',
'HTMLPurifier_PropertyListIterator' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php',
@ -654,6 +652,9 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php',
'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php',
'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php',
'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php',
'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php',
'Ramsey\\Uuid\\BinaryUtils' => __DIR__ . '/..' . '/ramsey/uuid/src/BinaryUtils.php',
'Ramsey\\Uuid\\Builder\\DefaultUuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/DefaultUuidBuilder.php',
'Ramsey\\Uuid\\Builder\\DegradedUuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/DegradedUuidBuilder.php',
@ -1283,6 +1284,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'Zotlabs\\Daemon\\Addon' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Addon.php',
'Zotlabs\\Daemon\\CacheThumb' => __DIR__ . '/../..' . '/Zotlabs/Daemon/CacheThumb.php',
'Zotlabs\\Daemon\\Cache_embeds' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Cache_embeds.php',
'Zotlabs\\Daemon\\Cache_image' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Cache_image.php',
'Zotlabs\\Daemon\\Channel_purge' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Channel_purge.php',
'Zotlabs\\Daemon\\Checksites' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Checksites.php',
'Zotlabs\\Daemon\\Content_importer' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Content_importer.php',
@ -1358,7 +1360,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'Zotlabs\\Lib\\Share' => __DIR__ . '/../..' . '/Zotlabs/Lib/Share.php',
'Zotlabs\\Lib\\SvgSanitizer' => __DIR__ . '/../..' . '/Zotlabs/Lib/SvgSanitizer.php',
'Zotlabs\\Lib\\System' => __DIR__ . '/../..' . '/Zotlabs/Lib/System.php',
'Zotlabs\\Lib\\TableConverter' => __DIR__ . '/../..' . '/Zotlabs/Lib/Markdown.php',
'Zotlabs\\Lib\\ThreadItem' => __DIR__ . '/../..' . '/Zotlabs/Lib/ThreadItem.php',
'Zotlabs\\Lib\\ThreadListener' => __DIR__ . '/../..' . '/Zotlabs/Lib/ThreadListener.php',
'Zotlabs\\Lib\\ThreadStream' => __DIR__ . '/../..' . '/Zotlabs/Lib/ThreadStream.php',
@ -1385,6 +1386,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'Zotlabs\\Module\\Admin\\Site' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Site.php',
'Zotlabs\\Module\\Admin\\Themes' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Themes.php',
'Zotlabs\\Module\\Affinity' => __DIR__ . '/../..' . '/Zotlabs/Module/Affinity.php',
'Zotlabs\\Module\\Album' => __DIR__ . '/../..' . '/Zotlabs/Module/Album.php',
'Zotlabs\\Module\\Ap_probe' => __DIR__ . '/../..' . '/Zotlabs/Module/Ap_probe.php',
'Zotlabs\\Module\\Api' => __DIR__ . '/../..' . '/Zotlabs/Module/Api.php',
'Zotlabs\\Module\\Appman' => __DIR__ . '/../..' . '/Zotlabs/Module/Appman.php',
@ -1417,6 +1419,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'Zotlabs\\Module\\Connedit' => __DIR__ . '/../..' . '/Zotlabs/Module/Connedit.php',
'Zotlabs\\Module\\Contactgroup' => __DIR__ . '/../..' . '/Zotlabs/Module/Contactgroup.php',
'Zotlabs\\Module\\Content_filter' => __DIR__ . '/../..' . '/Zotlabs/Module/Content_filter.php',
'Zotlabs\\Module\\Conversation' => __DIR__ . '/../..' . '/Zotlabs/Module/Conversation.php',
'Zotlabs\\Module\\Cover_photo' => __DIR__ . '/../..' . '/Zotlabs/Module/Cover_photo.php',
'Zotlabs\\Module\\Dav' => __DIR__ . '/../..' . '/Zotlabs/Module/Dav.php',
'Zotlabs\\Module\\Defperms' => __DIR__ . '/../..' . '/Zotlabs/Module/Defperms.php',
@ -1848,6 +1851,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'Zotlabs\\Update\\_1245' => __DIR__ . '/../..' . '/Zotlabs/Update/_1245.php',
'Zotlabs\\Update\\_1246' => __DIR__ . '/../..' . '/Zotlabs/Update/_1246.php',
'Zotlabs\\Update\\_1247' => __DIR__ . '/../..' . '/Zotlabs/Update/_1247.php',
'Zotlabs\\Update\\_1248' => __DIR__ . '/../..' . '/Zotlabs/Update/_1248.php',
'Zotlabs\\Web\\Controller' => __DIR__ . '/../..' . '/Zotlabs/Web/Controller.php',
'Zotlabs\\Web\\HTTPHeaders' => __DIR__ . '/../..' . '/Zotlabs/Web/HTTPHeaders.php',
'Zotlabs\\Web\\HTTPSig' => __DIR__ . '/../..' . '/Zotlabs/Web/HTTPSig.php',

View file

@ -1,4 +1,5 @@
[
{
"packages": [
{
"name": "blueimp/jquery-file-upload",
"version": "v10.31.0",
@ -60,7 +61,8 @@
"url": "https://github.com/blueimp",
"type": "github"
}
]
],
"install-path": "../blueimp/jquery-file-upload"
},
{
"name": "bshaffer/oauth2-server-php",
@ -120,7 +122,8 @@
"auth",
"oauth",
"oauth2"
]
],
"install-path": "../bshaffer/oauth2-server-php"
},
{
"name": "commerceguys/intl",
@ -166,7 +169,8 @@
"name": "Bojan Zivanovic"
}
],
"description": "Internationalization library powered by CLDR data."
"description": "Internationalization library powered by CLDR data.",
"install-path": "../commerceguys/intl"
},
{
"name": "doctrine/collections",
@ -233,7 +237,8 @@
"collections",
"iterators",
"php"
]
],
"install-path": "../doctrine/collections"
},
{
"name": "ezyang/htmlpurifier",
@ -285,7 +290,8 @@
"homepage": "http://htmlpurifier.org/",
"keywords": [
"html"
]
],
"install-path": "../ezyang/htmlpurifier"
},
{
"name": "forkawesome/fork-awesome",
@ -334,7 +340,8 @@
"font",
"forkawesome",
"icon"
]
],
"install-path": "../forkawesome/fork-awesome"
},
{
"name": "jbroadway/urlify",
@ -395,7 +402,8 @@
"transliteration",
"url",
"urlify"
]
],
"install-path": "../jbroadway/urlify"
},
{
"name": "kzykhys/git",
@ -443,7 +451,8 @@
"email": "hayashi@valnur.net"
}
],
"description": "A Git wrapper for PHP5.3+"
"description": "A Git wrapper for PHP5.3+",
"install-path": "../kzykhys/git"
},
{
"name": "league/html-to-markdown",
@ -527,7 +536,8 @@
"url": "https://www.patreon.com/colinodell",
"type": "patreon"
}
]
],
"install-path": "../league/html-to-markdown"
},
{
"name": "masterminds/html5",
@ -594,7 +604,8 @@
"querypath",
"serializer",
"xml"
]
],
"install-path": "../masterminds/html5"
},
{
"name": "michelf/php-markdown",
@ -645,7 +656,8 @@
"homepage": "https://michelf.ca/projects/php-markdown/",
"keywords": [
"markdown"
]
],
"install-path": "../michelf/php-markdown"
},
{
"name": "p3k/emoji-detector",
@ -688,7 +700,8 @@
}
],
"description": "Detect and return all emoji found in a string",
"homepage": "https://github.com/aaronpk/emoji-detector-php"
"homepage": "https://github.com/aaronpk/emoji-detector-php",
"install-path": "../p3k/emoji-detector"
},
{
"name": "paragonie/random_compat",
@ -735,21 +748,22 @@
"polyfill",
"pseudorandom",
"random"
]
],
"install-path": "../paragonie/random_compat"
},
{
"name": "phpseclib/phpseclib",
"version": "2.0.30",
"version_normalized": "2.0.30.0",
"version": "2.0.31",
"version_normalized": "2.0.31.0",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "136b9ca7eebef78be14abf90d65c5e57b6bc5d36"
"reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/136b9ca7eebef78be14abf90d65c5e57b6bc5d36",
"reference": "136b9ca7eebef78be14abf90d65c5e57b6bc5d36",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/233a920cb38636a43b18d428f9a8db1f0a1a08f4",
"reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4",
"shasum": ""
},
"require": {
@ -766,9 +780,9 @@
"ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
"ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
},
"time": "2020-12-17T05:42:04+00:00",
"time": "2021-04-06T13:56:45+00:00",
"type": "library",
"installation-source": "dist",
"installation-source": "source",
"autoload": {
"files": [
"phpseclib/bootstrap.php"
@ -829,6 +843,10 @@
"x.509",
"x509"
],
"support": {
"issues": "https://github.com/phpseclib/phpseclib/issues",
"source": "https://github.com/phpseclib/phpseclib/tree/2.0.31"
},
"funding": [
{
"url": "https://github.com/terrafrost",
@ -842,34 +860,35 @@
"url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
"type": "tidelift"
}
]
],
"install-path": "../phpseclib/phpseclib"
},
{
"name": "psr/log",
"version": "1.1.3",
"version_normalized": "1.1.3.0",
"version": "1.1.4",
"version_normalized": "1.1.4.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"time": "2020-03-23T09:12:05+00:00",
"time": "2021-05-03T11:20:27+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"installation-source": "dist",
"installation-source": "source",
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
@ -882,7 +901,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
@ -891,7 +910,11 @@
"log",
"psr",
"psr-3"
]
],
"support": {
"source": "https://github.com/php-fig/log/tree/1.1.4"
},
"install-path": "../psr/log"
},
{
"name": "ramsey/uuid",
@ -980,7 +1003,8 @@
"guid",
"identifier",
"uuid"
]
],
"install-path": "../ramsey/uuid"
},
{
"name": "sabre/dav",
@ -1065,7 +1089,8 @@
"WebDAV",
"framework",
"iCalendar"
]
],
"install-path": "../sabre/dav"
},
{
"name": "sabre/event",
@ -1124,7 +1149,8 @@
"plugin",
"promise",
"signal"
]
],
"install-path": "../sabre/event"
},
{
"name": "sabre/http",
@ -1182,7 +1208,8 @@
"homepage": "https://github.com/fruux/sabre-http",
"keywords": [
"http"
]
],
"install-path": "../sabre/http"
},
{
"name": "sabre/uri",
@ -1235,7 +1262,8 @@
"rfc3986",
"uri",
"url"
]
],
"install-path": "../sabre/uri"
},
{
"name": "sabre/vobject",
@ -1333,7 +1361,8 @@
"vcf",
"xCal",
"xCard"
]
],
"install-path": "../sabre/vobject"
},
{
"name": "sabre/xml",
@ -1398,7 +1427,8 @@
"XMLWriter",
"dom",
"xml"
]
],
"install-path": "../sabre/xml"
},
{
"name": "simshaun/recurr",
@ -1454,7 +1484,8 @@
"recurrence",
"recurring",
"rrule"
]
],
"install-path": "../simshaun/recurr"
},
{
"name": "smarty/smarty",
@ -1513,38 +1544,39 @@
"homepage": "http://www.smarty.net",
"keywords": [
"templating"
]
],
"install-path": "../smarty/smarty"
},
{
"name": "symfony/deprecation-contracts",
"version": "v2.2.0",
"version_normalized": "2.2.0.0",
"version": "v2.4.0",
"version_normalized": "2.4.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665"
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5fa56b4074d1ae755beb55617ddafe6f5d78f665",
"reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627",
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"time": "2020-09-07T11:33:47+00:00",
"time": "2021-03-23T23:28:01+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
"dev-main": "2.4-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"installation-source": "dist",
"installation-source": "source",
"autoload": {
"files": [
"function.php"
@ -1566,6 +1598,9 @@
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
@ -1579,7 +1614,8 @@
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
]
],
"install-path": "../symfony/deprecation-contracts"
},
{
"name": "symfony/options-resolver",
@ -1647,7 +1683,8 @@
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
]
],
"install-path": "../symfony/options-resolver"
},
{
"name": "symfony/polyfill-ctype",
@ -1725,7 +1762,8 @@
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
]
],
"install-path": "../symfony/polyfill-ctype"
},
{
"name": "symfony/polyfill-php73",
@ -1803,7 +1841,8 @@
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
]
],
"install-path": "../symfony/polyfill-php73"
},
{
"name": "symfony/polyfill-php80",
@ -1885,30 +1924,31 @@
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
]
],
"install-path": "../symfony/polyfill-php80"
},
{
"name": "symfony/process",
"version": "v5.2.4",
"version_normalized": "5.2.4.0",
"version": "v5.2.7",
"version_normalized": "5.2.7.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f"
"reference": "98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/313a38f09c77fbcdc1d223e57d368cea76a2fd2f",
"reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f",
"url": "https://api.github.com/repos/symfony/process/zipball/98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e",
"reference": "98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/polyfill-php80": "^1.15"
},
"time": "2021-01-27T10:15:41+00:00",
"time": "2021-04-08T10:27:02+00:00",
"type": "library",
"installation-source": "dist",
"installation-source": "source",
"autoload": {
"psr-4": {
"Symfony\\Component\\Process\\": ""
@ -1933,6 +1973,9 @@
],
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/v5.3.0-BETA1"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
@ -1946,7 +1989,8 @@
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
]
],
"install-path": "../symfony/process"
},
{
"name": "twbs/bootstrap",
@ -1999,7 +2043,8 @@
"responsive",
"sass",
"web"
]
],
"install-path": "../twbs/bootstrap"
},
{
"name": "voku/portable-ascii",
@ -2071,7 +2116,8 @@
"url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii",
"type": "tidelift"
}
]
],
"install-path": "../voku/portable-ascii"
},
{
"name": "voku/stop-words",
@ -2116,6 +2162,10 @@
"keywords": [
"stop words",
"stop-words"
]
],
"install-path": "../voku/stop-words"
}
],
"dev": false,
"dev-package-names": []
}
]

335
vendor/composer/installed.php vendored Normal file
View file

@ -0,0 +1,335 @@
<?php return array (
'root' =>
array (
'pretty_version' => 'dev-dev',
'version' => 'dev-dev',
'aliases' =>
array (
),
'reference' => '7f4e6c2b64be07ce7587dc906e1d65494121a534',
'name' => 'zot/zap',
),
'versions' =>
array (
'blueimp/jquery-file-upload' =>
array (
'pretty_version' => 'v10.31.0',
'version' => '10.31.0.0',
'aliases' =>
array (
),
'reference' => '0740f81829698b84efe17e72501e0f420ea0d611',
),
'bshaffer/oauth2-server-php' =>
array (
'pretty_version' => 'v1.11.1',
'version' => '1.11.1.0',
'aliases' =>
array (
),
'reference' => '5a0c8000d4763b276919e2106f54eddda6bc50fa',
),
'commerceguys/intl' =>
array (
'pretty_version' => 'v0.7.5',
'version' => '0.7.5.0',
'aliases' =>
array (
),
'reference' => 'de1435502068393fae4061818e194e4ea61b98d6',
),
'doctrine/collections' =>
array (
'pretty_version' => '1.6.7',
'version' => '1.6.7.0',
'aliases' =>
array (
),
'reference' => '55f8b799269a1a472457bd1a41b4f379d4cfba4a',
),
'ezyang/htmlpurifier' =>
array (
'pretty_version' => 'v4.13.0',
'version' => '4.13.0.0',
'aliases' =>
array (
),
'reference' => '08e27c97e4c6ed02f37c5b2b20488046c8d90d75',
),
'forkawesome/fork-awesome' =>
array (
'pretty_version' => '1.1.7',
'version' => '1.1.7.0',
'aliases' =>
array (
),
'reference' => '326af9c8bee0c80ff4c00cb2fadd4f1edd2a08c3',
),
'jbroadway/urlify' =>
array (
'pretty_version' => '1.2.2-stable',
'version' => '1.2.2.0',
'aliases' =>
array (
),
'reference' => '9b227e8548f16268cef55b5eb5d659a801fa824b',
),
'kzykhys/git' =>
array (
'pretty_version' => 'v0.1.2',
'version' => '0.1.2.0',
'aliases' =>
array (
),
'reference' => '3c4db987494c38eac300593719a4a7832abddadd',
),
'league/html-to-markdown' =>
array (
'pretty_version' => '4.10.0',
'version' => '4.10.0.0',
'aliases' =>
array (
),
'reference' => '0868ae7a552e809e5cd8f93ba022071640408e88',
),
'masterminds/html5' =>
array (
'pretty_version' => '2.7.4',
'version' => '2.7.4.0',
'aliases' =>
array (
),
'reference' => '9227822783c75406cfe400984b2f095cdf03d417',
),
'michelf/php-markdown' =>
array (
'pretty_version' => '1.9.0',
'version' => '1.9.0.0',
'aliases' =>
array (
),
'reference' => 'c83178d49e372ca967d1a8c77ae4e051b3a3c75c',
),
'p3k/emoji-detector' =>
array (
'pretty_version' => '0.2.1',
'version' => '0.2.1.0',
'aliases' =>
array (
),
'reference' => 'fb0765845e554f04ccd2b594a7ab8ca44d804bab',
),
'paragonie/random_compat' =>
array (
'pretty_version' => 'v9.99.99',
'version' => '9.99.99.0',
'aliases' =>
array (
),
'reference' => '84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95',
),
'phpseclib/phpseclib' =>
array (
'pretty_version' => '2.0.31',
'version' => '2.0.31.0',
'aliases' =>
array (
),
'reference' => '233a920cb38636a43b18d428f9a8db1f0a1a08f4',
),
'psr/log' =>
array (
'pretty_version' => '1.1.4',
'version' => '1.1.4.0',
'aliases' =>
array (
),
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
),
'ramsey/uuid' =>
array (
'pretty_version' => '3.9.3',
'version' => '3.9.3.0',
'aliases' =>
array (
),
'reference' => '7e1633a6964b48589b142d60542f9ed31bd37a92',
),
'rhumsaa/uuid' =>
array (
'replaced' =>
array (
0 => '3.9.3',
),
),
'sabre/dav' =>
array (
'pretty_version' => '3.2.3',
'version' => '3.2.3.0',
'aliases' =>
array (
),
'reference' => 'a9780ce4f35560ecbd0af524ad32d9d2c8954b80',
),
'sabre/event' =>
array (
'pretty_version' => '3.0.0',
'version' => '3.0.0.0',
'aliases' =>
array (
),
'reference' => '831d586f5a442dceacdcf5e9c4c36a4db99a3534',
),
'sabre/http' =>
array (
'pretty_version' => 'v4.2.4',
'version' => '4.2.4.0',
'aliases' =>
array (
),
'reference' => 'acccec4ba863959b2d10c1fa0fb902736c5c8956',
),
'sabre/uri' =>
array (
'pretty_version' => '1.2.1',
'version' => '1.2.1.0',
'aliases' =>
array (
),
'reference' => 'ada354d83579565949d80b2e15593c2371225e61',
),
'sabre/vobject' =>
array (
'pretty_version' => '4.2.2',
'version' => '4.2.2.0',
'aliases' =>
array (
),
'reference' => '449616b2d45b95c8973975de23f34a3d14f63b4b',
),
'sabre/xml' =>
array (
'pretty_version' => '1.5.1',
'version' => '1.5.1.0',
'aliases' =>
array (
),
'reference' => 'a367665f1df614c3b8fefc30a54de7cd295e444e',
),
'simshaun/recurr' =>
array (
'pretty_version' => 'v4.0.5',
'version' => '4.0.5.0',
'aliases' =>
array (
),
'reference' => '08b0b46879f598cd11dd42b4c1a9c221a0562749',
),
'smarty/smarty' =>
array (
'pretty_version' => 'v3.1.39',
'version' => '3.1.39.0',
'aliases' =>
array (
),
'reference' => 'e27da524f7bcd7361e3ea5cdfa99c4378a7b5419',
),
'symfony/deprecation-contracts' =>
array (
'pretty_version' => 'v2.4.0',
'version' => '2.4.0.0',
'aliases' =>
array (
),
'reference' => '5f38c8804a9e97d23e0c8d63341088cd8a22d627',
),
'symfony/options-resolver' =>
array (
'pretty_version' => 'v5.2.4',
'version' => '5.2.4.0',
'aliases' =>
array (
),
'reference' => '5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce',
),
'symfony/polyfill-ctype' =>
array (
'pretty_version' => 'v1.22.1',
'version' => '1.22.1.0',
'aliases' =>
array (
),
'reference' => 'c6c942b1ac76c82448322025e084cadc56048b4e',
),
'symfony/polyfill-php73' =>
array (
'pretty_version' => 'v1.22.1',
'version' => '1.22.1.0',
'aliases' =>
array (
),
'reference' => 'a678b42e92f86eca04b7fa4c0f6f19d097fb69e2',
),
'symfony/polyfill-php80' =>
array (
'pretty_version' => 'v1.22.1',
'version' => '1.22.1.0',
'aliases' =>
array (
),
'reference' => 'dc3063ba22c2a1fd2f45ed856374d79114998f91',
),
'symfony/process' =>
array (
'pretty_version' => 'v5.2.7',
'version' => '5.2.7.0',
'aliases' =>
array (
),
'reference' => '98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e',
),
'twbs/bootstrap' =>
array (
'pretty_version' => 'v4.1.3',
'version' => '4.1.3.0',
'aliases' =>
array (
),
'reference' => '3b558734382ce58b51e5fc676453bfd53bba9201',
),
'twitter/bootstrap' =>
array (
'replaced' =>
array (
0 => 'v4.1.3',
),
),
'voku/portable-ascii' =>
array (
'pretty_version' => '1.5.6',
'version' => '1.5.6.0',
'aliases' =>
array (
),
'reference' => '80953678b19901e5165c56752d087fc11526017c',
),
'voku/stop-words' =>
array (
'pretty_version' => '2.0.1',
'version' => '2.0.1.0',
'aliases' =>
array (
),
'reference' => '8e63c0af20f800b1600783764e0ce19e53969f71',
),
'zot/zap' =>
array (
'pretty_version' => 'dev-dev',
'version' => 'dev-dev',
'aliases' =>
array (
),
'reference' => '7f4e6c2b64be07ce7587dc906e1d65494121a534',
),
),
);

26
vendor/composer/platform_check.php vendored Normal file
View file

@ -0,0 +1,26 @@
<?php
// platform_check.php @generated by Composer
$issues = array();
if (!(PHP_VERSION_ID >= 70205)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.5". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
} elseif (!headers_sent()) {
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
}
}
trigger_error(
'Composer detected issues in your platform: ' . implode(' ', $issues),
E_USER_ERROR
);
}

View file

@ -0,0 +1,9 @@
* text=auto
/build/ export-ignore
/tests/ export-ignore
/travis/ export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/CHANGELOG.md export-ignore
/phpunit.xml.dist export-ignore

3
vendor/phpseclib/phpseclib/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/vendor
/composer.phar
composer.lock

45
vendor/phpseclib/phpseclib/.travis.yml vendored Normal file
View file

@ -0,0 +1,45 @@
language: php
matrix:
include:
- php: 5.3
dist: precise
- php: 5.4
dist: trusty
- php: 5.5.9
dist: trusty
- php: 5.5
dist: trusty
- php: 5.6
dist: xenial
- php: 7.0
dist: xenial
- php: 7.1
dist: xenial
- php: 7.2
dist: xenial
- php: 7.3
dist: xenial
- php: 7.4
dist: xenial
- php: 8.0
dist: bionic
before_install: true
install:
- wget http://ftp.gnu.org/gnu/parallel/parallel-20170822.tar.bz2
- tar -xvjf parallel*
- cd parallel-20170822
- ./configure
- make
- sudo make install
- cd ..
- eval `ssh-agent -s`
- travis/setup-secure-shell.sh
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' -a `php -r "echo (int) version_compare(PHP_VERSION, '7.0', '<');"` = "1" ]; then travis/install-php-extensions.sh; fi"
- travis/setup-composer.sh
script:
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' ]; then vendor/bin/phing -f build/build.xml sniff; fi"
- travis/run-phpunit.sh

547
vendor/phpseclib/phpseclib/CHANGELOG.md vendored Normal file
View file

@ -0,0 +1,547 @@
# Changelog
## 2.0.31 - 2021-04-06
- X509: always parse the first cert of a bundle (#1568)
- SSH2: behave like putty with broken publickey auth (#1572)
- SSH2: don't close channel on unexpected response to channel request (#1631)
- RSA: support keys with PSS algorithm identifier (#1584)
- RSA: cleanup RSA PKCS#1 v1.5 signature verification (CVE-2021-30130)
- SFTP/Stream: make it so you can write past the end of a file (#1618)
- SFTP: fix undefined index notice in stream touch() (#1615)
- SFTP: digit only filenames were converted to integers by php (#1623)
- BigInteger: fix issue with toBits on 32-bit PHP 8 installs
- Crypt: use a custom error handler for mcrypt to avoid deprecation errors
## 2.0.30 - 2020-12-16
- X509: don't attempt to parse multi-cert PEMs (#1542)
- SFTP: add stream to get method (#1546)
- SFTP: progress callback should report actual downloaded bytes (#1543)
- SSH2: end connection faster for algorithm mismatch
- SSH2: add setKeepAlive() method (#1529)
- ANSI: fix PHP8 compatibility issues
## 2.0.29 - 2020-09-07
- SFTP: add enableDatePreservation() / disableDatePreservation() (#1496)
- SFTP: uploads on low speed networks could get in infinite loop (#1507)
- SSH2: when building algo list look at if crypto engine is set (#1500)
- X509: really looong base64 encoded strings broke extractBER() (#1486)
## 2.0.28 - 2020-07-08
- SFTP: realpath('') produced an error (#1474)
- SFTP: if /path/to/file is a file then /path/to/file/whatever errors (#1475)
- SFTP: speed up uploads (by changing SFTP upload packet size from 4KB to 32KB)
- ANSI: fix "Number of elements can't be negative" error
## 2.0.27 - 2020-05-22
- SFTP: another attempt at speeding up uploads (#1455)
- SSH2: try logging in with none as an auth method first (#1454)
- ASN1: fix for malformed ASN1 strings (#1456)
## 2.0.26 - 2020-03-22
- SFTP: another attempt at speeding up uploads (#1455)
- SSH2: try logging in with none as an auth method first (#1454)
- ASN1: fix for malformed ASN1 strings (#1456)
## 2.0.25 - 2020-02-25
- SFTP: re-add buffering (#1455)
## 2.0.24 - 2020-02-22
- X509: fix PHP 5.3 compatability issue
- SSH2: arcfour128 / arcfour256 were being included twice
- SSH2: make window resizing behave more consistently with PuTTY (#1421)
- SSH2: sodium_compat doesn't support memzero (#1432)
- SSH2: logging enhancements
- SFTP: don't buffer up download requests (PuTTY doesn't) (#1425)
- RSA: make PSS verification work for key length that aren't a power of 2 (#1423)
## 2.0.23 - 2019-09-16
- SSH2: fix regression for connecting to servers with bad hostnames (#1405)
## 2.0.22 - 2019-09-15
- SSH2: backport setPreferredAlgorithms() / getAlgorithmsNegotiated (#1156)
- SSH2 / SFTP: fix issues with ping() (#1402)
- X509: IPs in nameconstraints extension include netmask (#1387)
- X509: fix issue with explicit time tags whose maps expect implicit (#1388)
- BigInteger: fix bug with toBytes() with fixed precision negative numbers
- fix PHP 7.4 deprecations
## 2.0.21 - 2019-07-14
- SSH2: only auto close the channel for exec() timeouts (#1384)
## 2.0.20 - 2019-06-23
- BigInteger: lower PHP req back down to PHP 5.3.3 (#1382)
## 2.0.19 - 2019-06-19
- BigInteger: fix issues with divide method in pure-PHP mode
## 2.0.18 - 2019-06-13
- SSH2: close channel when a timeout occurs (#1378)
- SFTP: improve handling of malformed packets (#1371)
- RSA: add support for OpenSSH private keys (#1372)
## 2.0.17 - 2019-05-26
- BigInteger: new BigInteger('-0') caused issues with GMP
## 2.0.16 - 2019-05-26
- BigInteger: new BigInteger('00') caused issues with GMP
- BigInteger: GMP engine didn't always return 1 or -1
- ASN1: revamp how OIDs are handled (#1367)
- ASN1: correctly handle long tags
- SSH2: fix issue with reconnecting via ping() (#1353)
- RSA: use hash_equals if available
## 2.0.15 - 2019-03-10
- SFTP: make it so get() can correctly handle out of order responses (#1343)
- Crypt: avoid bogus IV errors in ECB mode with OpenSSL (#1087)
- RSA: protect against possible timing attack during OAEP decryption
- RSA: fix possible memory leak with XML keys (#1346)
- Hash: fix issue with undefined constants (#1347)
- Hash: fix issues with the mode
- SCP: issue error if remote_file is empty in put() call (#1335)
- X509: whitelist OID 1.3.6.1.4.1.11129.2.4.2 (#1341)
## 2.0.14 - 2019-01-27
- SSH2: ssh-rsa is sometimes incorrectly used instead of rsa-sha2-256 (#1331)
- SSH2: more strictly adhere to RFC8332 for rsa-sha2-256/512 (#1332)
## 2.0.13 - 2018-12-16
- SSH2: fix order of user_error() / bitmap reset (#1314)
- SSH2: setTimeout(0) didn't work as intended (#1116)
- Agent: add support for rsa-sha2-256 / rsa-sha2-512 (#1319)
- Agent: add parameter to constructor (#1319)
- X509: fix errors with validateDate (#1318)
## 2.0.12 - 2018-11-04
- SSH2: fixes relating to delayed global requests (#1271)
- SSH2: setEngine -> setPreferredEngine (#1294)
- SSH2: reset $this->bitmap when the connection fails (#1298)
- SSH2: add ping() method (#1298)
- SSH2: add support for rsa-sha2-256 / rsa-sha2-512 (RFC8332)
- SFTP: make rawlist give same result regardless of stat cache (#1287)
- Hash: save hashed keys for re-use
## 2.0.11 - 2018-04-15
- X509: auto download intermediate certs
- BigInteger: fix for (new BigInteger(48))->toString(true)) (#1264)
- ASN1: class is never set as key in _decode_ber
- check if phpinfo() is available before using (#1256)
- backport CFB8 support from master to 2.0 (#1257)
## 2.0.10 - 2018-02-08
- BigInteger: fix issue with bitwise_xor (#1245)
- Crypt: some of the minimum lengths were off
- SFTP: update stat cache accordingly when file becomes a directory (#1235)
- SFTP: fix issue with extended attributes on 64-bit PHP installs (#1248)
- SSH2: more channel handling updates (#1200)
- X509: use anonymous functions in PHP >= 5.3.0
- X509: revise logic for validateSignature (#1213)
- X509: fix 7.2 error when extensions were removed and new ones added (#1243)
- fix float to int conversions on ARM CPU's (#1220)
## 2.0.9 - 2017-11-29
- 2.0.8 tag was done off of master branch - not 2.0 branch
## 2.0.8 - 2017-11-29
- SSH2: fix issue with key re-exchange
- SSH2: updates to dealing with extraneous channel packets
- X509: URL validation didn't work (#1203)
## 2.0.7 - 2017-10-22
- SSH2:
- add new READ_NEXT mode (#1140)
- add sendIdentificationStringFirst()
- add sendKEXINITFirst()
- add sendIdentificationStringLast()
- add sendKEXINITLast() (#1162)
- assume any SSH server >= 1.99 supports SSH2 (#1170)
- workaround for bad arcfour256 implementations (#1171)
- don't choke when getting response from diff channel in exec() (#1167)
- SFTP:
- add enablePathCanonicalization()
- add disablePathCanonicalization() (#1137)
- fix put() with remote file stream resource (#1177)
- ANSI: misc fixes (#1150, #1161)
- X509: use DateTime instead of unix time (#1166)
- Ciphers: use eval() instead of create_function() for >= 5.3
## 2.0.6 - 2017-06-05
- Crypt: fix OpenSSL engine on <= PHP 5.3.6 (#1122)
- Random: suppress possible E_DEPRECATED errors
- RSA: reset variables if bad key was loaded
## 2.0.5 - 2017-05-07
- SSH2: don't use timeout value of 0 for fsockopen (#775)
- SSH2: make it so disabling PTY closes exec() channel if it's open (#1009)
- SSH2: include `<pre>` tags in getLog result when SAPI isn't CLI
- SFTP: don't assume current directory when $path parameter for delete is null (#1059)
- SFTP: fix put() with php://input as source (#1119)
- ASN1: fix UTCTime parsing (#1110)
- X509: ignore certificate transparency extension (#1073)
- Crypt: OpenSSL apparently supports variable size keys (#1085)
## 2.0.4 - 2016-10-03
- fix E_DEPRECATED errors on PHP 7.1 (#1041)
- SFTP: speed up downloads (#945)
- SFTP: fix infinite loop when uploading empty file (#995)
- ASN1: fix possible infinite loop in decode (#1027)
## 2.0.3 - 2016-08-18
- BigInteger/RSA: don't compare openssl versions > 1.0 (#946)
- RSA: don't attempt to use the CRT when zero value components exist (#980)
- RSA: zero salt length RSA signatures don't work (#1002)
- ASN1: fix PHP Warning on PHP 7.1 (#1013)
- X509: set parameter fields to null for CSR's / RSA (#914)
- CRL optimizations (#1000)
- SSH2: fix "Expected SSH_FXP_STATUS or ..." error (#999)
- SSH2: use stream_get_* instead of fread() / fgets() (#967)
- SFTP: make symlinks support relative target's (#1004)
- SFTP: fix sending stream resulting in zero byte file (#995)
## 2.0.2 - 2016-06-04
- All Ciphers: fix issue with CBC mode / OpenSSL / continuous buffers / decryption (#938)
- Random: fix issues with serialize() (#932)
- RC2: fix issue with decrypting
- RC4: fix issue with key not being truncated correctly
- SFTP: nlist() on a non-existent directory resulted in error
- SFTP: add is_writable, is_writeable, is_readable
- X509: add IPv6 support for subjectaltname extension (#936)
## 2.0.1 - 2016-01-18
- RSA: fix regression in PSS mode ([#769](https://github.com/phpseclib/phpseclib/pull/769))
- RSA: fix issue loading PKCS8 specific keys ([#861](https://github.com/phpseclib/phpseclib/pull/861))
- X509: add getOID() method ([#789](https://github.com/phpseclib/phpseclib/pull/789))
- X509: improve base64-encoded detection rules ([#855](https://github.com/phpseclib/phpseclib/pull/855))
- SFTP: fix quirky behavior with put() ([#830](https://github.com/phpseclib/phpseclib/pull/830))
- SFTP: fix E_NOTICE ([#883](https://github.com/phpseclib/phpseclib/pull/883))
- SFTP/Stream: fix issue with filenames with hashes ([#901](https://github.com/phpseclib/phpseclib/pull/901))
- SSH2: add isAuthenticated() method ([#897](https://github.com/phpseclib/phpseclib/pull/897))
- SSH/Agent: fix possible PHP warning ([#923](https://github.com/phpseclib/phpseclib/issues/923))
- BigInteger: add __debugInfo() magic method ([#881](https://github.com/phpseclib/phpseclib/pull/881))
- BigInteger: fix issue with doing bitwise not on 0
- add getBlockLength() method to symmetric ciphers
## 2.0.0 - 2015-08-04
- Classes were renamed and namespaced ([#243](https://github.com/phpseclib/phpseclib/issues/243))
- The use of an autoloader is now required (e.g. Composer)
## 1.0.19 - 2020-07-07
- SSH2: arcfour128 / arcfour256 were being included twice
- SSH2: make window resizing behave more consistently with PuTTY (#1421)
- SSH2: logging enhancements
- SSH2: try logging in with none as an auth method first (#1454)
- SFTP: change the mode with a SETSTAT instead of MKDIR (#1463)
- SFTP: make it so extending SFTP class doesn't cause a segfault (#1465)
- SFTP: realpath('') produced an error (#1474)
- SFTP: if /path/to/file is a file then /path/to/file/whatever errors (#1475)
- RSA: make PSS verification work for key length that aren't a power of 2 (#1423)
- ASN1: fix for malformed ASN1 strings (#1456)
- ANSI: fix "Number of elements can't be negative" error
## 1.0.18 - 2019-09-16
- SSH2: fix regression for connecting to servers with bad hostnames (#1405)
## 1.0.17 - 2019-09-15
- SSH2: backport setPreferredAlgorithms() / getAlgorithmsNegotiated (#1156)
- SSH2 / SFTP: fix issues with ping() (#1402)
- SSH2: only auto close the channel for exec() timeouts (#1384)
- SSH2 / SFTP: fix issues with ping() (#1402)
- SFTP: add progress callback to get() (#1375)
- SFTP: fix array_merge(): Argument #1 is not an array error (#1379)
- X509: IPs in nameconstraints extension include netmask (#1387)
- X509: fix issue with explicit time tags whose maps expect implicit (#1388)
- BigInteger: fix issues with divide method
- BigInteger: fix bug with toBytes() with fixed precision negative numbers
- fix PHP 7.4 deprecations
## 1.0.16 - 2019-06-13
- BigInteger: new BigInteger('-0') caused issues with GMP
- BigInteger: new BigInteger('00') caused issues with GMP
- BigInteger: GMP engine didn't always return 1 or -1
- ASN1: revamp how OIDs are handled (#1367)
- ASN1: correctly handle long tags
- SSH2: fix issue with reconnecting via ping() (#1353)
- SSH2: close channel when a timeout occurs (#1378)
- SFTP: improve handling of malformed packets (#1371)
- RSA: add support for OpenSSH private keys (#1372)
- RSA: use hash_equals if available
## 1.0.15 - 2019-03-10
- SFTP: make it so get() can correctly handle out of order responses (#1343)
- Crypt: avoid bogus IV errors in ECB mode with OpenSSL (#1087)
- RSA: protect against possible timing attack during OAEP decryption
- RSA: fix possible memory leak with XML keys (#1346)
- Hash: fix issues with the mode
- SCP: issue error if remote_file is empty in put() call (#1335)
- X509: whitelist OID 1.3.6.1.4.1.11129.2.4.2 (#1341)
## 1.0.14 - 2019-01-27
- SSH2: ssh-rsa is sometimes incorrectly used instead of rsa-sha2-256 (#1331)
- SSH2: more strictly adhere to RFC8332 for rsa-sha2-256/512 (#1332)
## 1.0.13 - 2018-12-16
- SSH2: fix order of user_error() / bitmap reset (#1314)
- SSH2: setTimeout(0) didn't work as intended (#1116)
- Agent: add support for rsa-sha2-256 / rsa-sha2-512 (#1319)
- Agent: add parameter to constructor (#1319)
## 1.0.12 - 2018-11-04
- SSH2: fixes relating to delayed global requests (#1271)
- SSH2: setEngine -> setPreferredEngine (#1294)
- SSH2: reset $this->bitmap when the connection fails (#1298)
- SSH2: add ping() method (#1298)
- SSH2: add support for rsa-sha2-256 / rsa-sha2-512 (RFC8332)
- SFTP: make rawlist give same result regardless of stat cache (#1287)
- Hash: save hashed keys for re-use
## 1.0.11 - 2018-04-15
- X509: auto download intermediate certs
- BigInteger: fix for (new BigInteger(48))->toString(true)) (#1264)
- ASN1: class is never set as key in _decode_ber
## 1.0.10 - 2018-02-08
- BigInteger: fix issue with bitwise_xor (#1245)
- Crypt: some of the minimum lengths were off
- SFTP: update stat cache accordingly when file becomes a directory (#1235)
- SFTP: fix issue with extended attributes on 64-bit PHP installs (#1248)
- SSH2: more channel handling updates (#1200)
- X509: use anonymous functions in PHP >= 5.3.0
- X509: revise logic for validateSignature (#1213)
- X509: fix 7.2 error when extensions were removed and new ones added (#1243)
- fix float to int conversions on ARM CPU's (#1220)
## 1.0.9 - 2017-11-29
- SSH2: fix issue with key re-exchange
- SSH2: updates to dealing with extraneous channel packets
- X509: URL validation didn't work (#1203)
## 1.0.8 - 2017-10-22
- SSH2:
- add new READ_NEXT mode (#1140)
- add sendIdentificationStringFirst()
- add sendKEXINITFirst()
- add sendIdentificationStringLast()
- add sendKEXINITLast() (#1162)
- assume any SSH server >= 1.99 supports SSH2 (#1170)
- workaround for bad arcfour256 implementations (#1171)
- don't choke when getting response from diff channel in exec() (#1167)
- SFTP:
- add enablePathCanonicalization()
- add disablePathCanonicalization() (#1137)
- fix put() with remote file stream resource (#1177)
- ANSI: misc fixes (#1150, #1161)
- X509: use DateTime instead of unix time (#1166)
- Ciphers: use eval() instead of create_function() for >= 5.3
## 1.0.7 - 2017-06-05
- Crypt: fix OpenSSL engine on <= PHP 5.3.6 (#1122)
- Random: suppress possible E_DEPRECATED errors
- RSA: reset variables if bad key was loaded
## 1.0.6 - 2017-05-07
- SSH2: don't use timeout value of 0 for fsockopen (#775)
- SSH2: make it so disabling PTY closes exec() channel if it's open (#1009)
- SSH2: include `<pre>` tags in getLog result when SAPI isn't CLI
- SFTP: don't assume current directory when $path parameter for delete is null (#1059)
- SFTP: fix put() with php://input as source (#1119)
- ASN1: fix UTCTime parsing (#1110)
- X509: ignore certificate transparency extension (#1073)
- Crypt: OpenSSL apparently supports variable size keys (#1085)
## 1.0.5 - 2016-10-22
- fix issue preventing installation of 1.0.x via Composer (#1048)
## 1.0.4 - 2016-10-03
- fix E_DEPRECATED errors on PHP 7.0 and 7.1 (#1041)
- fix float to int conversions on 32-bit Linux pre-PHP 5.3 (#1038, #1034)
- SFTP: speed up downloads (#945)
- SFTP: fix infinite loop when uploading empty file (#995)
- ASN1: fix possible infinite loop in decode (#1027)
## 1.0.3 - 2016-08-18
- BigInteger/RSA: don't compare openssl versions > 1.0 (#946)
- RSA: don't attempt to use the CRT when zero value components exist (#980)
- RSA: zero salt length RSA signatures don't work (#1002)
- ASN1: fix PHP Warning on PHP 7.1 (#1013)
- X509: set parameter fields to null for CSR's / RSA (#914)
- CRL optimizations (#1000)
- SSH2: fix "Expected SSH_FXP_STATUS or ..." error (#999)
- SFTP: make symlinks support relative target's (#1004)
- SFTP: fix sending stream resulting in zero byte file (#995)
## 1.0.2 - 2016-05-07
- All Ciphers: fix issue with CBC mode / OpenSSL / continuous buffers / decryption (#938)
- Random: fix issues with serialize() (#932)
- RC2: fix issue with decrypting
- RC4: fix issue with key not being truncated correctly
- SFTP: nlist() on a non-existent directory resulted in error
- SFTP: add is_writable, is_writeable, is_readable
- RSA: fix PHP4 compatibility issue
## 1.0.1 - 2016-01-18
- RSA: fix regression in PSS mode ([#769](https://github.com/phpseclib/phpseclib/pull/769))
- RSA: fix issue loading PKCS8 specific keys ([#861](https://github.com/phpseclib/phpseclib/pull/861))
- X509: add getOID() method ([#789](https://github.com/phpseclib/phpseclib/pull/789))
- X509: improve base64-encoded detection rules ([#855](https://github.com/phpseclib/phpseclib/pull/855))
- SFTP: fix quirky behavior with put() ([#830](https://github.com/phpseclib/phpseclib/pull/830))
- SFTP: fix E_NOTICE ([#883](https://github.com/phpseclib/phpseclib/pull/883))
- SFTP/Stream: fix issue with filenames with hashes ([#901](https://github.com/phpseclib/phpseclib/pull/901))
- SSH2: add isAuthenticated() method ([#897](https://github.com/phpseclib/phpseclib/pull/897))
- SSH/Agent: fix possible PHP warning ([#923](https://github.com/phpseclib/phpseclib/issues/923))
- BigInteger: add __debugInfo() magic method ([#881](https://github.com/phpseclib/phpseclib/pull/881))
- BigInteger: fix issue with doing bitwise not on 0
- add getBlockLength() method to symmetric ciphers
## 1.0.0 - 2015-08-02
- OpenSSL support for symmetric ciphers ([#507](https://github.com/phpseclib/phpseclib/pull/507))
- rewritten vt100 terminal emulator (File_ANSI) ([#689](https://github.com/phpseclib/phpseclib/pull/689))
- agent-forwarding support (System_SSH_Agent) ([#592](https://github.com/phpseclib/phpseclib/pull/592))
- Net_SSH2 improvements
- diffie-hellman-group-exchange-sha1/sha256 support ([#714](https://github.com/phpseclib/phpseclib/pull/714))
- window size handling updates ([#717](https://github.com/phpseclib/phpseclib/pull/717))
- Net_SFTP improvements
- add callback support to put() ([#655](https://github.com/phpseclib/phpseclib/pull/655))
- stat cache fixes ([#743](https://github.com/phpseclib/phpseclib/issues/743), [#730](https://github.com/phpseclib/phpseclib/issues/730), [#709](https://github.com/phpseclib/phpseclib/issues/709), [#726](https://github.com/phpseclib/phpseclib/issues/726))
- add "none" encryption mode to Crypt_RSA ([#692](https://github.com/phpseclib/phpseclib/pull/692))
- misc ASN.1 / X.509 parsing fixes ([#721](https://github.com/phpseclib/phpseclib/pull/721), [#627](https://github.com/phpseclib/phpseclib/pull/627))
- use a random serial number for new X509 certs ([#740](https://github.com/phpseclib/phpseclib/pull/740))
- add getPublicKeyFingerprint() to Crypt_RSA ([#677](https://github.com/phpseclib/phpseclib/pull/677))
## 0.3.10 - 2015-02-04
- simplify SSH2 window size handling ([#538](https://github.com/phpseclib/phpseclib/pull/538))
- slightly relax the conditions under which OpenSSL is used ([#598](https://github.com/phpseclib/phpseclib/pull/598))
- fix issue with empty constructed context-specific tags in ASN1 ([#606](https://github.com/phpseclib/phpseclib/pull/606))
## 0.3.9 - 2014-11-09
- PHP 5.6 improvements ([#482](https://github.com/phpseclib/phpseclib/pull/482), [#491](https://github.com/phpseclib/phpseclib/issues/491))
## 0.3.8 - 2014-09-12
- improve support for indef lengths in File_ASN1
- add hmac-sha2-256 support to Net_SSH2
- make it so negotiated algorithms can be seen before Net_SSH2 login
- add sha256-96 and sha512-96 to Crypt_Hash
- window size handling adjustments in Net_SSH2
## 0.3.7 - 2014-07-05
- auto-detect public vs private keys
- add file_exists, is_dir, is_file, readlink and symlink to Net_SFTP
- add support for recursive nlist and rawlist
- make it so nlist and rawlist can return pre-sorted output
- make it so callback functions can make exec() return early
- add signSPKAC and saveSPKAC methods to File_X509
- add support for PKCS8 keys in Crypt_RSA
- add pbkdf1 support to setPassword() in Crypt_Base
- add getWindowColumns, getWindowRows, setWindowColumns, setWindowRows to Net_SSH2
- add support for filenames with spaces in them to Net_SCP
## 0.3.6 - 2014-02-23
- add preliminary support for custom SSH subsystems
- add ssh-agent support
## 0.3.5 - 2013-07-11
- numerous SFTP changes:
- chown
- chgrp
- truncate
- improved file type detection
- put() can write to the middle of a file
- mkdir accepts the same parameters that PHP's mkdir does
- the ability to upload/download 2GB files
- across-the-board speedups for the various encryption algorithms
- multi-factor authentication support for Net_SSH2
- a $callback parameter for Net_SSH2::exec
- new classes:
- Net_SFTP_StreamWrapper
- Net_SCP
- Crypt_Twofish
- Crypt_Blowfish
## 0.3.1 - 2012-11-20
- add Net_SSH2::enableQuietMode() for suppressing stderr
- add Crypt_RSA::__toString() and Crypt_RSA::getSize()
- fix problems with File_X509::validateDate(), File_X509::sign() and Crypt_RSA::verify()
- use OpenSSL to speed up modular exponention in Math_BigInteger
- improved timeout functionality in Net_SSH2
- add support for SFTPv2
- add support for CRLs in File_X509
- SSH-2.0-SSH doesn't implement hmac-*-96 correctly
## 0.3.0 - 2012-07-08
- add support for reuming Net_SFTP::put()
- add support for recursive deletes and recursive chmods to Net_SFTP
- add setTimeout() to Net_SSH2
- add support for PBKDF2 to the various Crypt_* classes via setPassword()
- add File_X509 and File_ASN1
- add the ability to decode various formats in Crypt_RSA
- make Net_SSH2::getServerPublicHostKey() return a printer-friendly version of the public key
## 0.2.2 - 2011-05-09
- CFB and OFB modes were added to all block ciphers
- support for interactive mode was added to Net_SSH2
- Net_SSH2 now has limited keyboard_interactive authentication support
- support was added for PuTTY formatted RSA private keys and XML formatted RSA private keys
- Crypt_RSA::loadKey() will now try all key types automatically
- add support for AES-128-CBC and DES-EDE3-CFB encrypted RSA private keys
- add Net_SFTP::stat(), Net_SFTP::lstat() and Net_SFTP::rawlist()
- logging was added to Net_SSH1
- the license was changed to the less restrictive MIT license

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="phpseclib"
description="PHP Secure Communications Library"
default="all"
>
<target name="all" depends="sniff" />
<!-- Code Sniffer -->
<target name="sniff" depends="sniff-php-code,sniff-php-tests" />
<target name="sniff-php-code">
<exec command="vendor/bin/phpcs -s
--extensions=php
--standard=build/code-sniffer-ruleset.xml
phpseclib/"
dir=".." checkreturn="true" passthru="true" />
</target>
<target name="sniff-php-tests">
<exec command="vendor/bin/phpcs -s
--extensions=php
--standard=build/code-sniffer-ruleset-tests.xml
tests/"
dir=".." checkreturn="true" passthru="true" />
</target>
</project>

View file

@ -0,0 +1,17 @@
<?xml version="1.0"?>
<ruleset name="phpseclib Test Standard">
<description>phpseclib coding standard for tests</description>
<!-- In general rules that apply to library code also apply to tests. -->
<rule ref="./code-sniffer-ruleset.xml">
<!-- Exceptions to the library coding standard follow. -->
<!-- Test classes do not have to be namespaced but may use pseudo-namespacing
using underscore. -->
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" />
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />
</rule>
</ruleset>

View file

@ -0,0 +1,35 @@
<?xml version="1.0"?>
<ruleset name="phpseclib Standard">
<description>phpseclib coding standard</description>
<!-- We are using the PSR2 standard as a base -->
<rule ref="PSR2">
<!-- Exceptions due to legacy code with PHP4 compatibility -->
<exclude name="PSR2.Classes.PropertyDeclaration.ScopeMissing" />
<exclude name="PSR2.Classes.PropertyDeclaration.VarUsed" />
<exclude name="Squiz.Scope.MethodScope.Missing" />
<!-- Exceptions for backward compatibility -->
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
<exclude name="PSR2.Methods.MethodDeclaration.Underscore" />
<!-- Exceptions for whitespacing -->
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma" />
<exclude name="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonCASE" />
<exclude name="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonDEFAULT" />
<!-- Other Exceptions -->
<exclude name="Generic.Files.LineLength.TooLong" />
<exclude name="PSR2.ControlStructures.SwitchDeclaration.TerminatingComment" />
</rule>
<!-- Useful additional rules follow -->
<!-- "for (; bar; )" should be "while (bar)" instead -->
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" />
<!-- A method MUST not only call its parent -->
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
</ruleset>

View file

@ -779,12 +779,14 @@ abstract class Base
}
if ($this->engine === self::ENGINE_MCRYPT) {
set_error_handler(array($this, 'do_nothing'));
if ($this->changed) {
$this->_setupMcrypt();
$this->changed = false;
}
if ($this->enchanged) {
@mcrypt_generic_init($this->enmcrypt, $this->key, $this->encryptIV);
mcrypt_generic_init($this->enmcrypt, $this->key, $this->encryptIV);
$this->enchanged = false;
}
@ -817,15 +819,15 @@ abstract class Base
if ($len >= $block_size) {
if ($this->enbuffer['enmcrypt_init'] === false || $len > $this->cfb_init_len) {
if ($this->enbuffer['enmcrypt_init'] === true) {
@mcrypt_generic_init($this->enmcrypt, $this->key, $iv);
mcrypt_generic_init($this->enmcrypt, $this->key, $iv);
$this->enbuffer['enmcrypt_init'] = false;
}
$ciphertext.= @mcrypt_generic($this->enmcrypt, substr($plaintext, $i, $len - $len % $block_size));
$ciphertext.= mcrypt_generic($this->enmcrypt, substr($plaintext, $i, $len - $len % $block_size));
$iv = substr($ciphertext, -$block_size);
$len%= $block_size;
} else {
while ($len >= $block_size) {
$iv = @mcrypt_generic($this->ecb, $iv) ^ substr($plaintext, $i, $block_size);
$iv = mcrypt_generic($this->ecb, $iv) ^ substr($plaintext, $i, $block_size);
$ciphertext.= $iv;
$len-= $block_size;
$i+= $block_size;
@ -834,22 +836,26 @@ abstract class Base
}
if ($len) {
$iv = @mcrypt_generic($this->ecb, $iv);
$iv = mcrypt_generic($this->ecb, $iv);
$block = $iv ^ substr($plaintext, -$len);
$iv = substr_replace($iv, $block, 0, $len);
$ciphertext.= $block;
$pos = $len;
}
restore_error_handler();
return $ciphertext;
}
$ciphertext = @mcrypt_generic($this->enmcrypt, $plaintext);
$ciphertext = mcrypt_generic($this->enmcrypt, $plaintext);
if (!$this->continuousBuffer) {
@mcrypt_generic_init($this->enmcrypt, $this->key, $this->encryptIV);
mcrypt_generic_init($this->enmcrypt, $this->key, $this->encryptIV);
}
restore_error_handler();
return $ciphertext;
}
@ -1118,13 +1124,14 @@ abstract class Base
}
if ($this->engine === self::ENGINE_MCRYPT) {
set_error_handler(array($this, 'do_nothing'));
$block_size = $this->block_size;
if ($this->changed) {
$this->_setupMcrypt();
$this->changed = false;
}
if ($this->dechanged) {
@mcrypt_generic_init($this->demcrypt, $this->key, $this->decryptIV);
mcrypt_generic_init($this->demcrypt, $this->key, $this->decryptIV);
$this->dechanged = false;
}
@ -1152,26 +1159,30 @@ abstract class Base
}
if ($len >= $block_size) {
$cb = substr($ciphertext, $i, $len - $len % $block_size);
$plaintext.= @mcrypt_generic($this->ecb, $iv . $cb) ^ $cb;
$plaintext.= mcrypt_generic($this->ecb, $iv . $cb) ^ $cb;
$iv = substr($cb, -$block_size);
$len%= $block_size;
}
if ($len) {
$iv = @mcrypt_generic($this->ecb, $iv);
$iv = mcrypt_generic($this->ecb, $iv);
$plaintext.= $iv ^ substr($ciphertext, -$len);
$iv = substr_replace($iv, substr($ciphertext, -$len), 0, $len);
$pos = $len;
}
restore_error_handler();
return $plaintext;
}
$plaintext = @mdecrypt_generic($this->demcrypt, $ciphertext);
$plaintext = mdecrypt_generic($this->demcrypt, $ciphertext);
if (!$this->continuousBuffer) {
@mcrypt_generic_init($this->demcrypt, $this->key, $this->decryptIV);
mcrypt_generic_init($this->demcrypt, $this->key, $this->decryptIV);
}
restore_error_handler();
return $this->paddable ? $this->_unpad($plaintext) : $plaintext;
}
@ -1649,9 +1660,12 @@ abstract class Base
}
return false;
case self::ENGINE_MCRYPT:
return $this->cipher_name_mcrypt &&
set_error_handler(array($this, 'do_nothing'));
$result = $this->cipher_name_mcrypt &&
extension_loaded('mcrypt') &&
in_array($this->cipher_name_mcrypt, @mcrypt_list_algorithms());
in_array($this->cipher_name_mcrypt, mcrypt_list_algorithms());
restore_error_handler();
return $result;
case self::ENGINE_INTERNAL:
return true;
}
@ -1728,17 +1742,19 @@ abstract class Base
}
if ($this->engine != self::ENGINE_MCRYPT && $this->enmcrypt) {
set_error_handler(array($this, 'do_nothing'));
// Closing the current mcrypt resource(s). _mcryptSetup() will, if needed,
// (re)open them with the module named in $this->cipher_name_mcrypt
@mcrypt_module_close($this->enmcrypt);
@mcrypt_module_close($this->demcrypt);
mcrypt_module_close($this->enmcrypt);
mcrypt_module_close($this->demcrypt);
$this->enmcrypt = null;
$this->demcrypt = null;
if ($this->ecb) {
@mcrypt_module_close($this->ecb);
mcrypt_module_close($this->ecb);
$this->ecb = null;
}
restore_error_handler();
}
$this->changed = true;
@ -1851,19 +1867,19 @@ abstract class Base
self::MODE_STREAM => MCRYPT_MODE_STREAM,
);
$this->demcrypt = @mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], '');
$this->enmcrypt = @mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], '');
$this->demcrypt = mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], '');
$this->enmcrypt = mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], '');
// we need the $ecb mcrypt resource (only) in MODE_CFB with enableContinuousBuffer()
// to workaround mcrypt's broken ncfb implementation in buffered mode
// see: {@link http://phpseclib.sourceforge.net/cfb-demo.phps}
if ($this->mode == self::MODE_CFB) {
$this->ecb = @mcrypt_module_open($this->cipher_name_mcrypt, '', MCRYPT_MODE_ECB, '');
$this->ecb = mcrypt_module_open($this->cipher_name_mcrypt, '', MCRYPT_MODE_ECB, '');
}
} // else should mcrypt_generic_deinit be called?
if ($this->mode == self::MODE_CFB) {
@mcrypt_generic_init($this->ecb, $this->key, str_repeat("\0", $this->block_size));
mcrypt_generic_init($this->ecb, $this->key, str_repeat("\0", $this->block_size));
}
}
@ -2696,4 +2712,13 @@ abstract class Base
return $safeint . '((fmod(floor($temp / 0x80000000), 2) & 1) << 31))';
}
}
/**
* Dummy error handler to suppress mcrypt errors
*
* @access private
*/
function do_nothing()
{
}
}

View file

@ -1219,6 +1219,7 @@ class RSA
$length = $this->_decodeLength($temp);
switch ($this->_string_shift($temp, $length)) {
case "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x01": // rsaEncryption
case "\x2A\x86\x48\x86\xF7\x0D\x01\x01\x0A": // rsaPSS
break;
case "\x2a\x86\x48\x86\xf7\x0d\x01\x05\x03": // pbeWithMD5AndDES-CBC
/*
@ -2916,6 +2917,59 @@ class RSA
return $em;
}
/**
* EMSA-PKCS1-V1_5-ENCODE (without NULL)
*
* Quoting https://tools.ietf.org/html/rfc8017#page-65,
*
* "The parameters field associated with id-sha1, id-sha224, id-sha256,
* id-sha384, id-sha512, id-sha512/224, and id-sha512/256 should
* generally be omitted, but if present, it shall have a value of type
* NULL"
*
* @access private
* @param string $m
* @param int $emLen
* @return string
*/
function _emsa_pkcs1_v1_5_encode_without_null($m, $emLen)
{
$h = $this->hash->hash($m);
if ($h === false) {
return false;
}
switch ($this->hashName) {
case 'sha1':
$t = pack('H*', '301f300706052b0e03021a0414');
break;
case 'sha256':
$t = pack('H*', '302f300b06096086480165030402010420');
break;
case 'sha384':
$t = pack('H*', '303f300b06096086480165030402020430');
break;
case 'sha512':
$t = pack('H*', '304f300b06096086480165030402030440');
break;
default:
return false;
}
$t.= $h;
$tLen = strlen($t);
if ($emLen < $tLen + 11) {
user_error('Intended encoded message length too short');
return false;
}
$ps = str_repeat(chr(0xFF), $emLen - $tLen - 3);
$em = "\0\1$ps\0$t";
return $em;
}
/**
* RSASSA-PKCS1-V1_5-SIGN
*
@ -2982,13 +3036,17 @@ class RSA
// EMSA-PKCS1-v1_5 encoding
$em2 = $this->_emsa_pkcs1_v1_5_encode($m, $this->k);
if ($em2 === false) {
$em3 = $this->_emsa_pkcs1_v1_5_encode_without_null($m, $this->k);
if ($em2 === false && $em3 === false) {
user_error('RSA modulus too short');
return false;
}
// Compare
return $this->_equals($em, $em2);
return ($em2 !== false && $this->_equals($em, $em2)) ||
($em3 !== false && $this->_equals($em, $em3));
}
/**

View file

@ -235,7 +235,7 @@ class ASN1
$current = array('start' => $start);
$type = ord($encoded[$encoded_pos++]);
$start++;
$startOffset = 1;
$constructed = ($type >> 5) & 1;
@ -245,13 +245,20 @@ class ASN1
// process septets (since the eighth bit is ignored, it's not an octet)
do {
$temp = ord($encoded[$encoded_pos++]);
$startOffset++;
$loop = $temp >> 7;
$tag <<= 7;
$tag |= $temp & 0x7F;
$start++;
$temp &= 0x7F;
// "bits 7 to 1 of the first subsequent octet shall not all be zero"
if ($startOffset == 2 && $temp == 0) {
return false;
}
$tag |= $temp;
} while ($loop);
}
$start+= $startOffset;
// Length, as discussed in paragraph 8.1.3 of X.690-0207.pdf#page=13
$length = ord($encoded[$encoded_pos++]);
$start++;
@ -344,13 +351,16 @@ class ASN1
switch ($tag) {
case self::TYPE_BOOLEAN:
// "The contents octets shall consist of a single octet." -- paragraph 8.2.1
//if (strlen($content) != 1) {
// return false;
//}
if ($constructed || strlen($content) != 1) {
return false;
}
$current['content'] = (bool) ord($content[$content_pos]);
break;
case self::TYPE_INTEGER:
case self::TYPE_ENUMERATED:
if ($constructed) {
return false;
}
$current['content'] = new BigInteger(substr($content, $content_pos), -256);
break;
case self::TYPE_REAL: // not currently supported
@ -370,15 +380,15 @@ class ASN1
$last = count($temp) - 1;
for ($i = 0; $i < $last; $i++) {
// all subtags should be bit strings
//if ($temp[$i]['type'] != self::TYPE_BIT_STRING) {
// return false;
//}
if ($temp[$i]['type'] != self::TYPE_BIT_STRING) {
return false;
}
$current['content'].= substr($temp[$i]['content'], 1);
}
// all subtags should be bit strings
//if ($temp[$last]['type'] != self::TYPE_BIT_STRING) {
// return false;
//}
if ($temp[$last]['type'] != self::TYPE_BIT_STRING) {
return false;
}
$current['content'] = $temp[$last]['content'][0] . $current['content'] . substr($temp[$i]['content'], 1);
}
break;
@ -395,9 +405,9 @@ class ASN1
}
$content_pos += $temp['length'];
// all subtags should be octet strings
//if ($temp['type'] != self::TYPE_OCTET_STRING) {
// return false;
//}
if ($temp['type'] != self::TYPE_OCTET_STRING) {
return false;
}
$current['content'].= $temp['content'];
$length+= $temp['length'];
}
@ -408,12 +418,15 @@ class ASN1
break;
case self::TYPE_NULL:
// "The contents octets shall not contain any octets." -- paragraph 8.8.2
//if (strlen($content)) {
// return false;
//}
if ($constructed || strlen($content)) {
return false;
}
break;
case self::TYPE_SEQUENCE:
case self::TYPE_SET:
if (!$constructed) {
return false;
}
$offset = 0;
$current['content'] = array();
$content_len = strlen($content);
@ -434,7 +447,13 @@ class ASN1
}
break;
case self::TYPE_OBJECT_IDENTIFIER:
if ($constructed) {
return false;
}
$current['content'] = $this->_decodeOID(substr($content, $content_pos));
if ($current['content'] === false) {
return false;
}
break;
/* Each character string type shall be encoded as if it had been declared:
[UNIVERSAL x] IMPLICIT OCTET STRING
@ -464,12 +483,20 @@ class ASN1
case self::TYPE_UTF8_STRING:
// ????
case self::TYPE_BMP_STRING:
if ($constructed) {
return false;
}
$current['content'] = substr($content, $content_pos);
break;
case self::TYPE_UTC_TIME:
case self::TYPE_GENERALIZED_TIME:
if ($constructed) {
return false;
}
$current['content'] = $this->_decodeTime(substr($content, $content_pos), $tag);
break;
default:
return false;
}
$start+= $length;
@ -1127,6 +1154,11 @@ class ASN1
$oid = array();
$pos = 0;
$len = strlen($content);
if (ord($content[$len - 1]) & 0x80) {
return false;
}
$n = new BigInteger();
while ($pos < $len) {
$temp = ord($content[$pos++]);

View file

@ -5054,9 +5054,12 @@ class X509
* subject=/O=organization/OU=org unit/CN=common name
* issuer=/O=organization/CN=common name
*/
$temp = strlen($str) <= ini_get('pcre.backtrack_limit') ?
preg_replace('#.*?^-+[^-]+-+[\r\n ]*$#ms', '', $str, 1) :
$str;
if (strlen($str) > ini_get('pcre.backtrack_limit')) {
$temp = $str;
} else {
$temp = preg_replace('#.*?^-+[^-]+-+[\r\n ]*$#ms', '', $str, 1);
$temp = preg_replace('#-+END.*[\r\n ]*.*#ms', '', $str, 1);
}
// remove new lines
$temp = str_replace(array("\r", "\n", ' '), '', $temp);
// remove the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- stuff

View file

@ -658,11 +658,11 @@ class BigInteger
{
$hex = $this->toHex($twos_compliment);
$bits = '';
for ($i = strlen($hex) - 8, $start = strlen($hex) & 7; $i >= $start; $i-=8) {
$bits = str_pad(decbin(hexdec(substr($hex, $i, 8))), 32, '0', STR_PAD_LEFT) . $bits;
for ($i = strlen($hex) - 6, $start = strlen($hex) % 6; $i >= $start; $i-=6) {
$bits = str_pad(decbin(hexdec(substr($hex, $i, 6))), 24, '0', STR_PAD_LEFT) . $bits;
}
if ($start) { // hexdec('') == 0
$bits = str_pad(decbin(hexdec(substr($hex, 0, $start))), 8, '0', STR_PAD_LEFT) . $bits;
$bits = str_pad(decbin(hexdec(substr($hex, 0, $start))), 8 * $start, '0', STR_PAD_LEFT) . $bits;
}
$result = $this->precision > 0 ? substr($bits, -$this->precision) : ltrim($bits, '0');

View file

@ -1024,7 +1024,7 @@ class SFTP extends SSH2
uasort($contents, array(&$this, '_comparator'));
}
return $raw ? $contents : array_keys($contents);
return $raw ? $contents : array_map('strval', array_keys($contents));
}
/**
@ -3004,9 +3004,17 @@ class SFTP extends SSH2
$packet_type = '-> ' . $this->packet_types[$type] .
' (' . round($stop - $start, 4) . 's)';
if (NET_SFTP_LOGGING == self::LOG_REALTIME) {
echo "<pre>\r\n" . $this->_format_log(array($data), array($packet_type)) . "\r\n</pre>\r\n";
flush();
ob_flush();
switch (PHP_SAPI) {
case 'cli':
$start = $stop = "\r\n";
break;
default:
$start = '<pre>';
$stop = '</pre>';
}
echo $start . $this->_format_log(array($data), array($packet_type)) . $stop;
@flush();
@ob_flush();
} else {
$this->packet_type_log[] = $packet_type;
if (NET_SFTP_LOGGING == self::LOG_COMPLEX) {
@ -3113,9 +3121,17 @@ class SFTP extends SSH2
$packet_type = '<- ' . $this->packet_types[$this->packet_type] .
' (' . round($stop - $start, 4) . 's)';
if (NET_SFTP_LOGGING == self::LOG_REALTIME) {
echo "<pre>\r\n" . $this->_format_log(array($packet), array($packet_type)) . "\r\n</pre>\r\n";
flush();
ob_flush();
switch (PHP_SAPI) {
case 'cli':
$start = $stop = "\r\n";
break;
default:
$start = '<pre>';
$stop = '</pre>';
}
echo $start . $this->_format_log(array($packet), array($packet_type)) . $stop;
@flush();
@ob_flush();
} else {
$this->packet_type_log[] = $packet_type;
if (NET_SFTP_LOGGING == self::LOG_COMPLEX) {

View file

@ -410,7 +410,7 @@ class Stream
{
switch ($whence) {
case SEEK_SET:
if ($offset >= $this->size || $offset < 0) {
if ($offset < 0) {
return false;
}
break;
@ -447,7 +447,9 @@ class Stream
// and https://github.com/php/php-src/blob/master/main/php_streams.h#L592
switch ($option) {
case 1: // PHP_STREAM_META_TOUCH
return $this->sftp->touch($path, $var[0], $var[1]);
$time = isset($var[0]) ? $var[0] : null;
$atime = isset($var[1]) ? $var[1] : null;
return $this->sftp->touch($path, $time, $atime);
case 2: // PHP_STREAM_OWNER_NAME
case 3: // PHP_STREAM_GROUP_NAME
return false;

View file

@ -2634,6 +2634,13 @@ class SSH2
// we'll just take it on faith that the public key blob and the public key algorithm name are as
// they should be
$this->_updateLogHistory('UNKNOWN (60)', 'NET_SSH2_MSG_USERAUTH_PK_OK');
break;
case NET_SSH2_MSG_USERAUTH_SUCCESS:
$this->bitmap |= self::MASK_LOGIN;
return true;
default:
user_error('Unexpected response to publickey authentication pt 1');
return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION);
}
$packet = $part1 . chr(1) . $part2;
@ -2668,7 +2675,8 @@ class SSH2
return true;
}
return false;
user_error('Unexpected response to publickey authentication pt 2');
return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION);
}
/**
@ -2690,7 +2698,7 @@ class SSH2
*
* Sends an SSH2_MSG_IGNORE message every x seconds, if x is a positive non-zero number.
*
* @param mixed $timeout
* @param int $interval
* @access public
*/
function setKeepAlive($interval)
@ -2927,28 +2935,6 @@ class SSH2
return false;
}
$response = $this->_get_binary_packet();
if ($response === false) {
$this->bitmap = 0;
user_error('Connection closed by server');
return false;
}
if (!strlen($response)) {
return false;
}
list(, $type) = unpack('C', $this->_string_shift($response, 1));
switch ($type) {
case NET_SSH2_MSG_CHANNEL_SUCCESS:
// if a pty can't be opened maybe commands can still be executed
case NET_SSH2_MSG_CHANNEL_FAILURE:
break;
default:
user_error('Unable to request pseudo-terminal');
return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION);
}
$packet = pack(
'CNNa*C',
NET_SSH2_MSG_CHANNEL_REQUEST,
@ -2961,14 +2947,7 @@ class SSH2
return false;
}
$this->channel_status[self::CHANNEL_SHELL] = NET_SSH2_MSG_CHANNEL_REQUEST;
$response = $this->_get_channel_packet(self::CHANNEL_SHELL);
if ($response === false) {
return false;
}
$this->channel_status[self::CHANNEL_SHELL] = NET_SSH2_MSG_CHANNEL_DATA;
$this->channel_status[self::CHANNEL_SHELL] = NET_SSH2_MSG_IGNORE;
$this->bitmap |= self::MASK_SHELL;
@ -3897,6 +3876,16 @@ class SSH2
return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION);
}
break;
case NET_SSH2_MSG_IGNORE:
switch ($type) {
case NET_SSH2_MSG_CHANNEL_SUCCESS:
//$this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_DATA;
continue 3;
case NET_SSH2_MSG_CHANNEL_FAILURE:
user_error('Error opening channel');
return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION);
}
break;
case NET_SSH2_MSG_CHANNEL_REQUEST:
switch ($type) {
case NET_SSH2_MSG_CHANNEL_SUCCESS:
@ -3916,6 +3905,10 @@ class SSH2
switch ($type) {
case NET_SSH2_MSG_CHANNEL_DATA:
//if ($this->channel_status[$channel] == NET_SSH2_MSG_IGNORE) {
// $this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_DATA;
//}
/*
if ($channel == self::CHANNEL_EXEC) {
// SCP requires null packets, such as this, be sent. further, in the case of the ssh.com SSH server

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="tests/bootstrap.php"
colors="true"
>
<testsuites>
<testsuite name="phpseclib Unit Test Suite">
<directory>./tests/Unit/</directory>
</testsuite>
<testsuite name="phpseclib Functional Test Suite">
<directory>./tests/Functional/</directory>
</testsuite>
</testsuites>
<!-- Code Coverage -->
<filter>
<whitelist>
<directory>./phpseclib/</directory>
</whitelist>
</filter>
</phpunit>

View file

@ -0,0 +1,25 @@
#!/bin/bash
#
# This file is part of the phpseclib project.
#
# (c) Andreas Fischer <bantu@phpbb.com>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
set -e
function install_php_extension
{
cd "$1"
phpize
./configure
make
make install
cd ..
echo "extension=$1.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
}
# runkit
git clone https://github.com/zenovich/runkit.git
install_php_extension 'runkit'

View file

@ -0,0 +1,51 @@
#!/bin/sh
set -e
set -x
export PHPSECLIB_SSH_HOSTNAME='localhost'
export PHPSECLIB_SSH_USERNAME='phpseclib'
export PHPSECLIB_SSH_PASSWORD='EePoov8po1aethu2kied1ne0'
export PHPSECLIB_SSH_HOME='/home/phpseclib'
if [ "$TRAVIS_PHP_VERSION" = '5.2' ]
then
PHPUNIT="phpunit"
else
PHPUNIT="$(dirname "$0")/../vendor/bin/phpunit"
fi
PHPUNIT_ARGS='--verbose'
if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.4', '<');"` = "1" ]
then
PHPUNIT_ARGS="$PHPUNIT_ARGS -d zend.enable_gc=0"
fi
if $PHPUNIT --atleast-version 9
then
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/n setUpBeforeClass()/n setUpBeforeClass(): void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/n setUp()/n setUp(): void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/n tearDown()/n tearDown(): void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertIsArray([^)]*)\)/\1: void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertIsString([^)]*)\)/\1: void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertStringContainsString([^)]*)\)/\1: void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertStringNotContainsString([^)]*)\)/\1: void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_Crypt_\(AES\|Hash\|RSA\)_/class /g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_File_\(X509\)_/class /g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_Math_\(BigInteger\)_/class /g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_\(Crypt\|File\|Math\|Net\)_/class /g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Functional_Net_/class /g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/extends Unit_Crypt_Hash_\(SHA512Test\|SHA256Test\)/extends \1/g'
fi
if [ "$TRAVIS_PHP_VERSION" = 'hhvm' -o `php -r "echo (int) version_compare(PHP_VERSION, '7.0', '>=');"` = "1" ]
then
find tests -type f -name "*Test.php" | \
parallel --gnu --keep-order \
"echo '== {} =='; \"$PHPUNIT\" $PHPUNIT_ARGS {};"
else
"$PHPUNIT" \
$PHPUNIT_ARGS \
--coverage-text \
--coverage-clover code_coverage/clover.xml \
--coverage-html code_coverage/
fi

View file

@ -0,0 +1,3 @@
#!/bin/sh
composer self-update --no-interaction
composer install --no-interaction

View file

@ -0,0 +1,33 @@
#!/bin/sh
#
# This file is part of the phpseclib project.
#
# (c) Andreas Fischer <bantu@phpbb.com>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
set -e
set -x
USERNAME='phpseclib'
PASSWORD='EePoov8po1aethu2kied1ne0'
# Create phpseclib user and home directory
sudo useradd --create-home --base-dir /home "$USERNAME"
# Set phpseclib user password
echo "$USERNAME:$PASSWORD" | sudo chpasswd
# Create a 1024 bit RSA SSH key pair without passphrase for the travis user
ssh-keygen -t rsa -b 1024 -f "$HOME/.ssh/id_rsa" -q -N ""
# Add the generated private key to SSH agent of travis user
ssh-add "$HOME/.ssh/id_rsa"
# Allow the private key of the travis user to log in as phpseclib user
sudo mkdir -p "/home/$USERNAME/.ssh/"
sudo cp "$HOME/.ssh/id_rsa.pub" "/home/$USERNAME/.ssh/authorized_keys"
sudo ssh-keyscan -t rsa localhost > "/tmp/known_hosts"
sudo cp "/tmp/known_hosts" "/home/$USERNAME/.ssh/known_hosts"
sudo chown "$USERNAME:$USERNAME" "/home/$USERNAME/.ssh/" -R

2
vendor/psr/log/.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
.gitattributes export-ignore
.gitignore export-ignore

1
vendor/psr/log/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
vendor

View file

@ -15,7 +15,7 @@ abstract class AbstractLogger implements LoggerInterface
* System is unusable.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -31,7 +31,7 @@ abstract class AbstractLogger implements LoggerInterface
* trigger the SMS alerts and wake you up.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -46,7 +46,7 @@ abstract class AbstractLogger implements LoggerInterface
* Example: Application component unavailable, unexpected exception.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -60,7 +60,7 @@ abstract class AbstractLogger implements LoggerInterface
* be logged and monitored.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -76,7 +76,7 @@ abstract class AbstractLogger implements LoggerInterface
* that are not necessarily wrong.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -89,7 +89,7 @@ abstract class AbstractLogger implements LoggerInterface
* Normal but significant events.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -104,7 +104,7 @@ abstract class AbstractLogger implements LoggerInterface
* Example: User logs in, SQL logs.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -117,7 +117,7 @@ abstract class AbstractLogger implements LoggerInterface
* Detailed debug information.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/

View file

@ -10,7 +10,7 @@ trait LoggerAwareTrait
/**
* The logger instance.
*
* @var LoggerInterface
* @var LoggerInterface|null
*/
protected $logger;

View file

@ -7,7 +7,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"require": {

View file

@ -2,4 +2,4 @@ CHANGELOG
=========
The changelog is maintained for all Symfony contracts at the following URL:
https://github.com/symfony/contracts/blob/master/CHANGELOG.md
https://github.com/symfony/contracts/blob/main/CHANGELOG.md

View file

@ -1,4 +1,4 @@
Copyright (c) 2020 Fabien Potencier
Copyright (c) 2020-2021 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -25,7 +25,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
"dev-main": "2.4-dev"
},
"thanks": {
"name": "symfony/contracts",

4
vendor/symfony/process/.gitattributes vendored Normal file
View file

@ -0,0 +1,4 @@
/Tests export-ignore
/phpunit.xml.dist export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore

3
vendor/symfony/process/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
vendor/
composer.lock
phpunit.xml

View file

@ -133,7 +133,7 @@ class Process implements \IteratorAggregate
* @param array $command The command to run and its arguments listed as separate entries
* @param string|null $cwd The working directory or null to use the working dir of the current PHP process
* @param array|null $env The environment variables or null to use the same environment as the current PHP process
* @param mixed|null $input The input as stream resource, scalar or \Traversable, or null for no input
* @param mixed $input The input as stream resource, scalar or \Traversable, or null for no input
* @param int|float|null $timeout The timeout in seconds or null to disable
*
* @throws LogicException When proc_open is not installed
@ -180,7 +180,7 @@ class Process implements \IteratorAggregate
* @param string $command The command line to pass to the shell of the OS
* @param string|null $cwd The working directory or null to use the working dir of the current PHP process
* @param array|null $env The environment variables or null to use the same environment as the current PHP process
* @param mixed|null $input The input as stream resource, scalar or \Traversable, or null for no input
* @param mixed $input The input as stream resource, scalar or \Traversable, or null for no input
* @param int|float|null $timeout The timeout in seconds or null to disable
*
* @return static

View file

@ -0,0 +1,45 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Process\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Process\Process;
/**
* @author Andrei Olteanu <andrei@flashsoft.eu>
*/
class CreateNewConsoleTest extends TestCase
{
public function testOptionCreateNewConsole()
{
$this->expectNotToPerformAssertions();
try {
$process = new Process(['php', __DIR__.'/ThreeSecondProcess.php']);
$process->setOptions(['create_new_console' => true]);
$process->disableOutput();
$process->start();
} catch (\Exception $e) {
$this->fail($e);
}
}
public function testItReturnsFastAfterStart()
{
// The started process must run in background after the main has finished but that can't be tested with PHPUnit
$startTime = microtime(true);
$process = new Process(['php', __DIR__.'/ThreeSecondProcess.php']);
$process->setOptions(['create_new_console' => true]);
$process->disableOutput();
$process->start();
$this->assertLessThan(3000, $startTime - microtime(true));
}
}

View file

@ -0,0 +1,36 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Process\Tests;
use Symfony\Component\Process\Exception\ProcessTimedOutException;
use Symfony\Component\Process\Process;
require \dirname(__DIR__).'/vendor/autoload.php';
['e' => $php] = getopt('e:') + ['e' => 'php'];
try {
$process = new Process("exec $php -r \"echo 'ready'; trigger_error('error', E_USER_ERROR);\"");
$process->start();
$process->setTimeout(0.5);
while (false === strpos($process->getOutput(), 'ready')) {
usleep(1000);
}
$process->signal(\SIGSTOP);
$process->wait();
return $process->getExitCode();
} catch (ProcessTimedOutException $t) {
echo $t->getMessage().\PHP_EOL;
return 1;
}

View file

@ -0,0 +1,175 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Process\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Process\ExecutableFinder;
/**
* @author Chris Smith <chris@cs278.org>
*/
class ExecutableFinderTest extends TestCase
{
private $path;
protected function tearDown(): void
{
if ($this->path) {
// Restore path if it was changed.
putenv('PATH='.$this->path);
}
}
private function setPath($path)
{
$this->path = getenv('PATH');
putenv('PATH='.$path);
}
public function testFind()
{
if (ini_get('open_basedir')) {
$this->markTestSkipped('Cannot test when open_basedir is set');
}
$this->setPath(\dirname(\PHP_BINARY));
$finder = new ExecutableFinder();
$result = $finder->find($this->getPhpBinaryName());
$this->assertSamePath(\PHP_BINARY, $result);
}
public function testFindWithDefault()
{
if (ini_get('open_basedir')) {
$this->markTestSkipped('Cannot test when open_basedir is set');
}
$expected = 'defaultValue';
$this->setPath('');
$finder = new ExecutableFinder();
$result = $finder->find('foo', $expected);
$this->assertEquals($expected, $result);
}
public function testFindWithNullAsDefault()
{
if (ini_get('open_basedir')) {
$this->markTestSkipped('Cannot test when open_basedir is set');
}
$this->setPath('');
$finder = new ExecutableFinder();
$result = $finder->find('foo');
$this->assertNull($result);
}
public function testFindWithExtraDirs()
{
if (ini_get('open_basedir')) {
$this->markTestSkipped('Cannot test when open_basedir is set');
}
$this->setPath('');
$extraDirs = [\dirname(\PHP_BINARY)];
$finder = new ExecutableFinder();
$result = $finder->find($this->getPhpBinaryName(), null, $extraDirs);
$this->assertSamePath(\PHP_BINARY, $result);
}
public function testFindWithOpenBaseDir()
{
if ('\\' === \DIRECTORY_SEPARATOR) {
$this->markTestSkipped('Cannot run test on windows');
}
if (ini_get('open_basedir')) {
$this->markTestSkipped('Cannot test when open_basedir is set');
}
$this->iniSet('open_basedir', \dirname(\PHP_BINARY).\PATH_SEPARATOR.'/');
$finder = new ExecutableFinder();
$result = $finder->find($this->getPhpBinaryName());
$this->assertSamePath(\PHP_BINARY, $result);
}
public function testFindProcessInOpenBasedir()
{
if (ini_get('open_basedir')) {
$this->markTestSkipped('Cannot test when open_basedir is set');
}
if ('\\' === \DIRECTORY_SEPARATOR) {
$this->markTestSkipped('Cannot run test on windows');
}
$this->setPath('');
$this->iniSet('open_basedir', \PHP_BINARY.\PATH_SEPARATOR.'/');
$finder = new ExecutableFinder();
$result = $finder->find($this->getPhpBinaryName(), false);
$this->assertSamePath(\PHP_BINARY, $result);
}
public function testFindBatchExecutableOnWindows()
{
if (ini_get('open_basedir')) {
$this->markTestSkipped('Cannot test when open_basedir is set');
}
if ('\\' !== \DIRECTORY_SEPARATOR) {
$this->markTestSkipped('Can be only tested on windows');
}
$target = tempnam(sys_get_temp_dir(), 'example-windows-executable');
touch($target);
touch($target.'.BAT');
$this->assertFalse(is_executable($target));
$this->setPath(sys_get_temp_dir());
$finder = new ExecutableFinder();
$result = $finder->find(basename($target), false);
unlink($target);
unlink($target.'.BAT');
$this->assertSamePath($target.'.BAT', $result);
}
private function assertSamePath($expected, $tested)
{
if ('\\' === \DIRECTORY_SEPARATOR) {
$this->assertEquals(strtolower($expected), strtolower($tested));
} else {
$this->assertEquals($expected, $tested);
}
}
private function getPhpBinaryName()
{
return basename(\PHP_BINARY, '\\' === \DIRECTORY_SEPARATOR ? '.exe' : '');
}
}

View file

@ -0,0 +1,25 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$outputs = [
'First iteration output',
'Second iteration output',
'One more iteration output',
'This took more time',
];
$iterationTime = 10000;
foreach ($outputs as $output) {
usleep($iterationTime);
$iterationTime *= 10;
echo $output."\n";
}

View file

@ -0,0 +1,47 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Runs a PHP script that can be stopped only with a SIGKILL (9) signal for 3 seconds.
*
* @args duration Run this script with a custom duration
*
* @example `php NonStopableProcess.php 42` will run the script for 42 seconds
*/
function handleSignal($signal)
{
switch ($signal) {
case \SIGTERM:
$name = 'SIGTERM';
break;
case \SIGINT:
$name = 'SIGINT';
break;
default:
$name = $signal.' (unknown)';
break;
}
echo "signal $name\n";
}
pcntl_signal(\SIGTERM, 'handleSignal');
pcntl_signal(\SIGINT, 'handleSignal');
echo 'received ';
$duration = isset($argv[1]) ? (int) $argv[1] : 3;
$start = microtime(true);
while ($duration > (microtime(true) - $start)) {
usleep(10000);
pcntl_signal_dispatch();
}

View file

@ -0,0 +1,61 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Process\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Process\PhpExecutableFinder;
/**
* @author Robert Schönthal <seroscho@googlemail.com>
*/
class PhpExecutableFinderTest extends TestCase
{
/**
* tests find() with the constant PHP_BINARY.
*/
public function testFind()
{
$f = new PhpExecutableFinder();
$current = \PHP_BINARY;
$args = 'phpdbg' === \PHP_SAPI ? ' -qrr' : '';
$this->assertEquals($current.$args, $f->find(), '::find() returns the executable PHP');
$this->assertEquals($current, $f->find(false), '::find() returns the executable PHP');
}
/**
* tests find() with the env var PHP_PATH.
*/
public function testFindArguments()
{
$f = new PhpExecutableFinder();
if ('phpdbg' === \PHP_SAPI) {
$this->assertEquals(['-qrr'], $f->findArguments(), '::findArguments() returns phpdbg arguments');
} else {
$this->assertEquals([], $f->findArguments(), '::findArguments() returns no arguments');
}
}
public function testNotExitsBinaryFile()
{
$f = new PhpExecutableFinder();
$phpBinaryEnv = \PHP_BINARY;
putenv('PHP_BINARY=/usr/local/php/bin/php-invalid');
$this->assertFalse($f->find(), '::find() returns false because of not exist file');
$this->assertFalse($f->find(false), '::find(false) returns false because of not exist file');
putenv('PHP_BINARY='.$phpBinaryEnv);
}
}

View file

@ -0,0 +1,74 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Process\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Process\Exception\LogicException;
use Symfony\Component\Process\PhpExecutableFinder;
use Symfony\Component\Process\PhpProcess;
class PhpProcessTest extends TestCase
{
public function testNonBlockingWorks()
{
$expected = 'hello world!';
$process = new PhpProcess(<<<PHP
<?php echo '$expected';
PHP
);
$process->start();
$process->wait();
$this->assertEquals($expected, $process->getOutput());
}
public function testCommandLine()
{
$process = new PhpProcess(<<<'PHP'
<?php echo phpversion().PHP_SAPI;
PHP
);
$commandLine = $process->getCommandLine();
$process->start();
$this->assertStringContainsString($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after start');
$process->wait();
$this->assertStringContainsString($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after wait');
$this->assertSame(\PHP_VERSION.\PHP_SAPI, $process->getOutput());
}
public function testPassingPhpExplicitly()
{
$finder = new PhpExecutableFinder();
$php = array_merge([$finder->find(false)], $finder->findArguments());
$expected = 'hello world!';
$script = <<<PHP
<?php echo '$expected';
PHP;
$process = new PhpProcess($script, null, null, 60, $php);
$process->run();
$this->assertEquals($expected, $process->getOutput());
}
public function testProcessCannotBeCreatedUsingFromShellCommandLine()
{
static::expectException(LogicException::class);
static::expectExceptionMessage('The "Symfony\Component\Process\PhpProcess::fromShellCommandline()" method cannot be called when using "Symfony\Component\Process\PhpProcess".');
PhpProcess::fromShellCommandline(<<<PHP
<?php echo 'Hello World!';
PHP
);
}
}

View file

@ -0,0 +1,72 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
define('ERR_SELECT_FAILED', 1);
define('ERR_TIMEOUT', 2);
define('ERR_READ_FAILED', 3);
define('ERR_WRITE_FAILED', 4);
$read = [\STDIN];
$write = [\STDOUT, \STDERR];
stream_set_blocking(\STDIN, 0);
stream_set_blocking(\STDOUT, 0);
stream_set_blocking(\STDERR, 0);
$out = $err = '';
while ($read || $write) {
$r = $read;
$w = $write;
$e = null;
$n = stream_select($r, $w, $e, 5);
if (false === $n) {
exit(ERR_SELECT_FAILED);
} elseif ($n < 1) {
exit(ERR_TIMEOUT);
}
if (in_array(\STDOUT, $w) && strlen($out) > 0) {
$written = fwrite(\STDOUT, (string) $out, 32768);
if (false === $written) {
exit(ERR_WRITE_FAILED);
}
$out = (string) substr($out, $written);
}
if (null === $read && '' === $out) {
$write = array_diff($write, [\STDOUT]);
}
if (in_array(\STDERR, $w) && strlen($err) > 0) {
$written = fwrite(\STDERR, (string) $err, 32768);
if (false === $written) {
exit(ERR_WRITE_FAILED);
}
$err = (string) substr($err, $written);
}
if (null === $read && '' === $err) {
$write = array_diff($write, [\STDERR]);
}
if ($r) {
$str = fread(\STDIN, 32768);
if (false !== $str) {
$out .= $str;
$err .= $str;
}
if (false === $str || feof(\STDIN)) {
$read = null;
if (!feof(\STDIN)) {
exit(ERR_READ_FAILED);
}
}
}
}

View file

@ -0,0 +1,134 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Process\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Process;
/**
* @author Sebastian Marek <proofek@gmail.com>
*/
class ProcessFailedExceptionTest extends TestCase
{
/**
* tests ProcessFailedException throws exception if the process was successful.
*/
public function testProcessFailedExceptionThrowsException()
{
$process = $this->getMockBuilder(Process::class)->setMethods(['isSuccessful'])->setConstructorArgs([['php']])->getMock();
$process->expects($this->once())
->method('isSuccessful')
->willReturn(true);
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Expected a failed process, but the given process was successful.');
new ProcessFailedException($process);
}
/**
* tests ProcessFailedException uses information from process output
* to generate exception message.
*/
public function testProcessFailedExceptionPopulatesInformationFromProcessOutput()
{
$cmd = 'php';
$exitCode = 1;
$exitText = 'General error';
$output = 'Command output';
$errorOutput = 'FATAL: Unexpected error';
$workingDirectory = getcwd();
$process = $this->getMockBuilder(Process::class)->setMethods(['isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText', 'isOutputDisabled', 'getWorkingDirectory'])->setConstructorArgs([[$cmd]])->getMock();
$process->expects($this->once())
->method('isSuccessful')
->willReturn(false);
$process->expects($this->once())
->method('getOutput')
->willReturn($output);
$process->expects($this->once())
->method('getErrorOutput')
->willReturn($errorOutput);
$process->expects($this->once())
->method('getExitCode')
->willReturn($exitCode);
$process->expects($this->once())
->method('getExitCodeText')
->willReturn($exitText);
$process->expects($this->once())
->method('isOutputDisabled')
->willReturn(false);
$process->expects($this->once())
->method('getWorkingDirectory')
->willReturn($workingDirectory);
$exception = new ProcessFailedException($process);
$this->assertEquals(
"The command \"$cmd\" failed.\n\nExit Code: $exitCode($exitText)\n\nWorking directory: {$workingDirectory}\n\nOutput:\n================\n{$output}\n\nError Output:\n================\n{$errorOutput}",
str_replace("'php'", 'php', $exception->getMessage())
);
}
/**
* Tests that ProcessFailedException does not extract information from
* process output if it was previously disabled.
*/
public function testDisabledOutputInFailedExceptionDoesNotPopulateOutput()
{
$cmd = 'php';
$exitCode = 1;
$exitText = 'General error';
$workingDirectory = getcwd();
$process = $this->getMockBuilder(Process::class)->setMethods(['isSuccessful', 'isOutputDisabled', 'getExitCode', 'getExitCodeText', 'getOutput', 'getErrorOutput', 'getWorkingDirectory'])->setConstructorArgs([[$cmd]])->getMock();
$process->expects($this->once())
->method('isSuccessful')
->willReturn(false);
$process->expects($this->never())
->method('getOutput');
$process->expects($this->never())
->method('getErrorOutput');
$process->expects($this->once())
->method('getExitCode')
->willReturn($exitCode);
$process->expects($this->once())
->method('getExitCodeText')
->willReturn($exitText);
$process->expects($this->once())
->method('isOutputDisabled')
->willReturn(true);
$process->expects($this->once())
->method('getWorkingDirectory')
->willReturn($workingDirectory);
$exception = new ProcessFailedException($process);
$this->assertEquals(
"The command \"$cmd\" failed.\n\nExit Code: $exitCode($exitText)\n\nWorking directory: {$workingDirectory}",
str_replace("'php'", 'php', $exception->getMessage())
);
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,21 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
pcntl_signal(\SIGUSR1, function () { echo 'SIGUSR1'; exit; });
echo 'Caught ';
$n = 0;
while ($n++ < 400) {
usleep(10000);
pcntl_signal_dispatch();
}

View file

@ -0,0 +1,14 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
echo 'Worker started';
sleep(3);
echo 'Worker done';

30
vendor/symfony/process/phpunit.xml.dist vendored Normal file
View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
</php>
<testsuites>
<testsuite name="Symfony Process Component Test Suite">
<directory>./Tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>./</directory>
<exclude>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
</phpunit>