Upgrade to rc5

This commit is contained in:
Bastian Allgeier
2020-12-10 11:24:42 +01:00
parent 3fec0d7c93
commit c378376bc9
257 changed files with 13009 additions and 1846 deletions

View File

@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit12091bebabd81c9aba88b2aeec22c8d7::getLoader();
return ComposerAutoloaderInitc26333d865e0329b638bdc17afd29896::getLoader();

File diff suppressed because it is too large Load Diff

View File

@@ -37,8 +37,8 @@ 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
{

331
kirby/vendor/composer/InstalledVersions.php vendored Executable file
View File

@@ -0,0 +1,331 @@
<?php
namespace Composer;
use Composer\Semver\VersionParser;
class InstalledVersions
{
private static $installed = array (
'root' =>
array (
'pretty_version' => '3.5.0-rc.5',
'version' => '3.5.0.0-RC5',
'aliases' =>
array (
),
'reference' => NULL,
'name' => 'getkirby/cms',
),
'versions' =>
array (
'claviska/simpleimage' =>
array (
'pretty_version' => '3.5.1',
'version' => '3.5.1.0',
'aliases' =>
array (
),
'reference' => 'ab2ab8a4672738ab77b39b00922ee4e79aeadb11',
),
'filp/whoops' =>
array (
'pretty_version' => '2.9.1',
'version' => '2.9.1.0',
'aliases' =>
array (
),
'reference' => '307fb34a5ab697461ec4c9db865b20ff2fd40771',
),
'getkirby/cms' =>
array (
'pretty_version' => '3.5.0-rc.5',
'version' => '3.5.0.0-RC5',
'aliases' =>
array (
),
'reference' => NULL,
),
'getkirby/composer-installer' =>
array (
'pretty_version' => '1.2.0',
'version' => '1.2.0.0',
'aliases' =>
array (
),
'reference' => '240a8b2c275d61b66601feb58222b7d34bc6cf1e',
),
'laminas/laminas-escaper' =>
array (
'pretty_version' => '2.7.0',
'version' => '2.7.0.0',
'aliases' =>
array (
),
'reference' => '5e04bc5ae5990b17159d79d331055e2c645e5cc5',
),
'laminas/laminas-zendframework-bridge' =>
array (
'pretty_version' => '1.1.1',
'version' => '1.1.1.0',
'aliases' =>
array (
),
'reference' => '6ede70583e101030bcace4dcddd648f760ddf642',
),
'league/color-extractor' =>
array (
'pretty_version' => '0.3.2',
'version' => '0.3.2.0',
'aliases' =>
array (
),
'reference' => '837086ec60f50c84c611c613963e4ad2e2aec806',
),
'matthecat/colorextractor' =>
array (
'replaced' =>
array (
0 => '*',
),
),
'michelf/php-smartypants' =>
array (
'pretty_version' => '1.8.1',
'version' => '1.8.1.0',
'aliases' =>
array (
),
'reference' => '47d17c90a4dfd0ccf1f87e25c65e6c8012415aad',
),
'mustangostang/spyc' =>
array (
'pretty_version' => '0.6.3',
'version' => '0.6.3.0',
'aliases' =>
array (
),
'reference' => '4627c838b16550b666d15aeae1e5289dd5b77da0',
),
'phpmailer/phpmailer' =>
array (
'pretty_version' => 'v6.2.0',
'version' => '6.2.0.0',
'aliases' =>
array (
),
'reference' => 'e38888a75c070304ca5514197d4847a59a5c853f',
),
'psr/log' =>
array (
'pretty_version' => '1.1.3',
'version' => '1.1.3.0',
'aliases' =>
array (
),
'reference' => '0f73288fd15629204f9d42b7055f72dacbe811fc',
),
'symfony/polyfill-mbstring' =>
array (
'pretty_version' => 'v1.20.0',
'version' => '1.20.0.0',
'aliases' =>
array (
),
'reference' => '39d483bdf39be819deabf04ec872eb0b2410b531',
),
'true/punycode' =>
array (
'pretty_version' => 'v2.1.1',
'version' => '2.1.1.0',
'aliases' =>
array (
),
'reference' => 'a4d0c11a36dd7f4e7cd7096076cab6d3378a071e',
),
'zendframework/zend-escaper' =>
array (
'replaced' =>
array (
0 => '^2.6.1',
),
),
),
);
public static function getInstalledPackages()
{
return array_keys(self::$installed['versions']);
}
public static function isInstalled($packageName)
{
return isset(self::$installed['versions'][$packageName]);
}
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
public static function getVersionRanges($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
$ranges = array();
if (isset(self::$installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = self::$installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
public static function getVersion($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
if (!isset(self::$installed['versions'][$packageName]['version'])) {
return null;
}
return self::$installed['versions'][$packageName]['version'];
}
public static function getPrettyVersion($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return self::$installed['versions'][$packageName]['pretty_version'];
}
public static function getReference($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
if (!isset(self::$installed['versions'][$packageName]['reference'])) {
return null;
}
return self::$installed['versions'][$packageName]['reference'];
}
public static function getRootPackage()
{
return self::$installed['root'];
}
public static function getRawData()
{
return self::$installed;
}
public static function reload($data)
{
self::$installed = $data;
}
}

View File

@@ -6,6 +6,7 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Kirby\\Api\\Api' => $baseDir . '/src/Api/Api.php',
'Kirby\\Api\\Collection' => $baseDir . '/src/Api/Collection.php',
'Kirby\\Api\\Model' => $baseDir . '/src/Api/Model.php',
@@ -25,6 +26,11 @@ return array(
'Kirby\\Cms\\AppUsers' => $baseDir . '/src/Cms/AppUsers.php',
'Kirby\\Cms\\Asset' => $baseDir . '/src/Cms/Asset.php',
'Kirby\\Cms\\Auth' => $baseDir . '/src/Cms/Auth.php',
'Kirby\\Cms\\Auth\\Challenge' => $baseDir . '/src/Cms/Auth/Challenge.php',
'Kirby\\Cms\\Auth\\EmailChallenge' => $baseDir . '/src/Cms/Auth/EmailChallenge.php',
'Kirby\\Cms\\Block' => $baseDir . '/src/Cms/Block.php',
'Kirby\\Cms\\BlockConverter' => $baseDir . '/src/Cms/BlockConverter.php',
'Kirby\\Cms\\Blocks' => $baseDir . '/src/Cms/Blocks.php',
'Kirby\\Cms\\Blueprint' => $baseDir . '/src/Cms/Blueprint.php',
'Kirby\\Cms\\Collection' => $baseDir . '/src/Cms/Collection.php',
'Kirby\\Cms\\Collections' => $baseDir . '/src/Cms/Collections.php',
@@ -36,6 +42,8 @@ return array(
'Kirby\\Cms\\Email' => $baseDir . '/src/Cms/Email.php',
'Kirby\\Cms\\Event' => $baseDir . '/src/Cms/Event.php',
'Kirby\\Cms\\Field' => $baseDir . '/src/Cms/Field.php',
'Kirby\\Cms\\Fieldset' => $baseDir . '/src/Cms/Fieldset.php',
'Kirby\\Cms\\Fieldsets' => $baseDir . '/src/Cms/Fieldsets.php',
'Kirby\\Cms\\File' => $baseDir . '/src/Cms/File.php',
'Kirby\\Cms\\FileActions' => $baseDir . '/src/Cms/FileActions.php',
'Kirby\\Cms\\FileBlueprint' => $baseDir . '/src/Cms/FileBlueprint.php',
@@ -54,6 +62,8 @@ return array(
'Kirby\\Cms\\HasSiblings' => $baseDir . '/src/Cms/HasSiblings.php',
'Kirby\\Cms\\Html' => $baseDir . '/src/Cms/Html.php',
'Kirby\\Cms\\Ingredients' => $baseDir . '/src/Cms/Ingredients.php',
'Kirby\\Cms\\Item' => $baseDir . '/src/Cms/Item.php',
'Kirby\\Cms\\Items' => $baseDir . '/src/Cms/Items.php',
'Kirby\\Cms\\KirbyTag' => $baseDir . '/src/Cms/KirbyTag.php',
'Kirby\\Cms\\KirbyTags' => $baseDir . '/src/Cms/KirbyTags.php',
'Kirby\\Cms\\Language' => $baseDir . '/src/Cms/Language.php',
@@ -61,6 +71,10 @@ return array(
'Kirby\\Cms\\LanguageRoutes' => $baseDir . '/src/Cms/LanguageRoutes.php',
'Kirby\\Cms\\LanguageRules' => $baseDir . '/src/Cms/LanguageRules.php',
'Kirby\\Cms\\Languages' => $baseDir . '/src/Cms/Languages.php',
'Kirby\\Cms\\Layout' => $baseDir . '/src/Cms/Layout.php',
'Kirby\\Cms\\LayoutColumn' => $baseDir . '/src/Cms/LayoutColumn.php',
'Kirby\\Cms\\LayoutColumns' => $baseDir . '/src/Cms/LayoutColumns.php',
'Kirby\\Cms\\Layouts' => $baseDir . '/src/Cms/Layouts.php',
'Kirby\\Cms\\Media' => $baseDir . '/src/Cms/Media.php',
'Kirby\\Cms\\Model' => $baseDir . '/src/Cms/Model.php',
'Kirby\\Cms\\ModelPermissions' => $baseDir . '/src/Cms/ModelPermissions.php',
@@ -140,8 +154,14 @@ return array(
'Kirby\\Exception\\NotFoundException' => $baseDir . '/src/Exception/NotFoundException.php',
'Kirby\\Exception\\PermissionException' => $baseDir . '/src/Exception/PermissionException.php',
'Kirby\\Form\\Field' => $baseDir . '/src/Form/Field.php',
'Kirby\\Form\\FieldClass' => $baseDir . '/src/Form/FieldClass.php',
'Kirby\\Form\\Field\\BlocksField' => $baseDir . '/src/Form/Field/BlocksField.php',
'Kirby\\Form\\Field\\LayoutField' => $baseDir . '/src/Form/Field/LayoutField.php',
'Kirby\\Form\\Fields' => $baseDir . '/src/Form/Fields.php',
'Kirby\\Form\\Form' => $baseDir . '/src/Form/Form.php',
'Kirby\\Form\\Mixin\\EmptyState' => $baseDir . '/src/Form/Mixin/EmptyState.php',
'Kirby\\Form\\Mixin\\Max' => $baseDir . '/src/Form/Mixin/Max.php',
'Kirby\\Form\\Mixin\\Min' => $baseDir . '/src/Form/Mixin/Min.php',
'Kirby\\Form\\Options' => $baseDir . '/src/Form/Options.php',
'Kirby\\Form\\OptionsApi' => $baseDir . '/src/Form/OptionsApi.php',
'Kirby\\Form\\OptionsQuery' => $baseDir . '/src/Form/OptionsQuery.php',
@@ -176,6 +196,12 @@ return array(
'Kirby\\Image\\Exif' => $baseDir . '/src/Image/Exif.php',
'Kirby\\Image\\Image' => $baseDir . '/src/Image/Image.php',
'Kirby\\Image\\Location' => $baseDir . '/src/Image/Location.php',
'Kirby\\Parsley\\Element' => $baseDir . '/src/Parsley/Element.php',
'Kirby\\Parsley\\Inline' => $baseDir . '/src/Parsley/Inline.php',
'Kirby\\Parsley\\Parsley' => $baseDir . '/src/Parsley/Parsley.php',
'Kirby\\Parsley\\Schema' => $baseDir . '/src/Parsley/Schema.php',
'Kirby\\Parsley\\Schema\\Blocks' => $baseDir . '/src/Parsley/Schema/Blocks.php',
'Kirby\\Parsley\\Schema\\Plain' => $baseDir . '/src/Parsley/Schema/Plain.php',
'Kirby\\Session\\AutoSession' => $baseDir . '/src/Session/AutoSession.php',
'Kirby\\Session\\FileSessionStore' => $baseDir . '/src/Session/FileSessionStore.php',
'Kirby\\Session\\Session' => $baseDir . '/src/Session/Session.php',
@@ -199,6 +225,7 @@ return array(
'Kirby\\Toolkit\\Html' => $baseDir . '/src/Toolkit/Html.php',
'Kirby\\Toolkit\\I18n' => $baseDir . '/src/Toolkit/I18n.php',
'Kirby\\Toolkit\\Iterator' => $baseDir . '/src/Toolkit/Iterator.php',
'Kirby\\Toolkit\\Locale' => $baseDir . '/src/Toolkit/Locale.php',
'Kirby\\Toolkit\\Mime' => $baseDir . '/src/Toolkit/Mime.php',
'Kirby\\Toolkit\\Obj' => $baseDir . '/src/Toolkit/Obj.php',
'Kirby\\Toolkit\\Pagination' => $baseDir . '/src/Toolkit/Pagination.php',

View File

@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit12091bebabd81c9aba88b2aeec22c8d7
class ComposerAutoloaderInitc26333d865e0329b638bdc17afd29896
{
private static $loader;
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit12091bebabd81c9aba88b2aeec22c8d7
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit12091bebabd81c9aba88b2aeec22c8d7', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitc26333d865e0329b638bdc17afd29896', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit12091bebabd81c9aba88b2aeec22c8d7', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitc26333d865e0329b638bdc17afd29896', '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\ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitc26333d865e0329b638bdc17afd29896::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit12091bebabd81c9aba88b2aeec22c8d7
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7::$files;
$includeFiles = Composer\Autoload\ComposerStaticInitc26333d865e0329b638bdc17afd29896::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire12091bebabd81c9aba88b2aeec22c8d7($fileIdentifier, $file);
composerRequirec26333d865e0329b638bdc17afd29896($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire12091bebabd81c9aba88b2aeec22c8d7($fileIdentifier, $file)
function composerRequirec26333d865e0329b638bdc17afd29896($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
class ComposerStaticInitc26333d865e0329b638bdc17afd29896
{
public static $files = array (
'7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php',
@@ -100,6 +100,7 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
);
public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Kirby\\Api\\Api' => __DIR__ . '/../..' . '/src/Api/Api.php',
'Kirby\\Api\\Collection' => __DIR__ . '/../..' . '/src/Api/Collection.php',
'Kirby\\Api\\Model' => __DIR__ . '/../..' . '/src/Api/Model.php',
@@ -119,6 +120,11 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
'Kirby\\Cms\\AppUsers' => __DIR__ . '/../..' . '/src/Cms/AppUsers.php',
'Kirby\\Cms\\Asset' => __DIR__ . '/../..' . '/src/Cms/Asset.php',
'Kirby\\Cms\\Auth' => __DIR__ . '/../..' . '/src/Cms/Auth.php',
'Kirby\\Cms\\Auth\\Challenge' => __DIR__ . '/../..' . '/src/Cms/Auth/Challenge.php',
'Kirby\\Cms\\Auth\\EmailChallenge' => __DIR__ . '/../..' . '/src/Cms/Auth/EmailChallenge.php',
'Kirby\\Cms\\Block' => __DIR__ . '/../..' . '/src/Cms/Block.php',
'Kirby\\Cms\\BlockConverter' => __DIR__ . '/../..' . '/src/Cms/BlockConverter.php',
'Kirby\\Cms\\Blocks' => __DIR__ . '/../..' . '/src/Cms/Blocks.php',
'Kirby\\Cms\\Blueprint' => __DIR__ . '/../..' . '/src/Cms/Blueprint.php',
'Kirby\\Cms\\Collection' => __DIR__ . '/../..' . '/src/Cms/Collection.php',
'Kirby\\Cms\\Collections' => __DIR__ . '/../..' . '/src/Cms/Collections.php',
@@ -130,6 +136,8 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
'Kirby\\Cms\\Email' => __DIR__ . '/../..' . '/src/Cms/Email.php',
'Kirby\\Cms\\Event' => __DIR__ . '/../..' . '/src/Cms/Event.php',
'Kirby\\Cms\\Field' => __DIR__ . '/../..' . '/src/Cms/Field.php',
'Kirby\\Cms\\Fieldset' => __DIR__ . '/../..' . '/src/Cms/Fieldset.php',
'Kirby\\Cms\\Fieldsets' => __DIR__ . '/../..' . '/src/Cms/Fieldsets.php',
'Kirby\\Cms\\File' => __DIR__ . '/../..' . '/src/Cms/File.php',
'Kirby\\Cms\\FileActions' => __DIR__ . '/../..' . '/src/Cms/FileActions.php',
'Kirby\\Cms\\FileBlueprint' => __DIR__ . '/../..' . '/src/Cms/FileBlueprint.php',
@@ -148,6 +156,8 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
'Kirby\\Cms\\HasSiblings' => __DIR__ . '/../..' . '/src/Cms/HasSiblings.php',
'Kirby\\Cms\\Html' => __DIR__ . '/../..' . '/src/Cms/Html.php',
'Kirby\\Cms\\Ingredients' => __DIR__ . '/../..' . '/src/Cms/Ingredients.php',
'Kirby\\Cms\\Item' => __DIR__ . '/../..' . '/src/Cms/Item.php',
'Kirby\\Cms\\Items' => __DIR__ . '/../..' . '/src/Cms/Items.php',
'Kirby\\Cms\\KirbyTag' => __DIR__ . '/../..' . '/src/Cms/KirbyTag.php',
'Kirby\\Cms\\KirbyTags' => __DIR__ . '/../..' . '/src/Cms/KirbyTags.php',
'Kirby\\Cms\\Language' => __DIR__ . '/../..' . '/src/Cms/Language.php',
@@ -155,6 +165,10 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
'Kirby\\Cms\\LanguageRoutes' => __DIR__ . '/../..' . '/src/Cms/LanguageRoutes.php',
'Kirby\\Cms\\LanguageRules' => __DIR__ . '/../..' . '/src/Cms/LanguageRules.php',
'Kirby\\Cms\\Languages' => __DIR__ . '/../..' . '/src/Cms/Languages.php',
'Kirby\\Cms\\Layout' => __DIR__ . '/../..' . '/src/Cms/Layout.php',
'Kirby\\Cms\\LayoutColumn' => __DIR__ . '/../..' . '/src/Cms/LayoutColumn.php',
'Kirby\\Cms\\LayoutColumns' => __DIR__ . '/../..' . '/src/Cms/LayoutColumns.php',
'Kirby\\Cms\\Layouts' => __DIR__ . '/../..' . '/src/Cms/Layouts.php',
'Kirby\\Cms\\Media' => __DIR__ . '/../..' . '/src/Cms/Media.php',
'Kirby\\Cms\\Model' => __DIR__ . '/../..' . '/src/Cms/Model.php',
'Kirby\\Cms\\ModelPermissions' => __DIR__ . '/../..' . '/src/Cms/ModelPermissions.php',
@@ -234,8 +248,14 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
'Kirby\\Exception\\NotFoundException' => __DIR__ . '/../..' . '/src/Exception/NotFoundException.php',
'Kirby\\Exception\\PermissionException' => __DIR__ . '/../..' . '/src/Exception/PermissionException.php',
'Kirby\\Form\\Field' => __DIR__ . '/../..' . '/src/Form/Field.php',
'Kirby\\Form\\FieldClass' => __DIR__ . '/../..' . '/src/Form/FieldClass.php',
'Kirby\\Form\\Field\\BlocksField' => __DIR__ . '/../..' . '/src/Form/Field/BlocksField.php',
'Kirby\\Form\\Field\\LayoutField' => __DIR__ . '/../..' . '/src/Form/Field/LayoutField.php',
'Kirby\\Form\\Fields' => __DIR__ . '/../..' . '/src/Form/Fields.php',
'Kirby\\Form\\Form' => __DIR__ . '/../..' . '/src/Form/Form.php',
'Kirby\\Form\\Mixin\\EmptyState' => __DIR__ . '/../..' . '/src/Form/Mixin/EmptyState.php',
'Kirby\\Form\\Mixin\\Max' => __DIR__ . '/../..' . '/src/Form/Mixin/Max.php',
'Kirby\\Form\\Mixin\\Min' => __DIR__ . '/../..' . '/src/Form/Mixin/Min.php',
'Kirby\\Form\\Options' => __DIR__ . '/../..' . '/src/Form/Options.php',
'Kirby\\Form\\OptionsApi' => __DIR__ . '/../..' . '/src/Form/OptionsApi.php',
'Kirby\\Form\\OptionsQuery' => __DIR__ . '/../..' . '/src/Form/OptionsQuery.php',
@@ -270,6 +290,12 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
'Kirby\\Image\\Exif' => __DIR__ . '/../..' . '/src/Image/Exif.php',
'Kirby\\Image\\Image' => __DIR__ . '/../..' . '/src/Image/Image.php',
'Kirby\\Image\\Location' => __DIR__ . '/../..' . '/src/Image/Location.php',
'Kirby\\Parsley\\Element' => __DIR__ . '/../..' . '/src/Parsley/Element.php',
'Kirby\\Parsley\\Inline' => __DIR__ . '/../..' . '/src/Parsley/Inline.php',
'Kirby\\Parsley\\Parsley' => __DIR__ . '/../..' . '/src/Parsley/Parsley.php',
'Kirby\\Parsley\\Schema' => __DIR__ . '/../..' . '/src/Parsley/Schema.php',
'Kirby\\Parsley\\Schema\\Blocks' => __DIR__ . '/../..' . '/src/Parsley/Schema/Blocks.php',
'Kirby\\Parsley\\Schema\\Plain' => __DIR__ . '/../..' . '/src/Parsley/Schema/Plain.php',
'Kirby\\Session\\AutoSession' => __DIR__ . '/../..' . '/src/Session/AutoSession.php',
'Kirby\\Session\\FileSessionStore' => __DIR__ . '/../..' . '/src/Session/FileSessionStore.php',
'Kirby\\Session\\Session' => __DIR__ . '/../..' . '/src/Session/Session.php',
@@ -293,6 +319,7 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
'Kirby\\Toolkit\\Html' => __DIR__ . '/../..' . '/src/Toolkit/Html.php',
'Kirby\\Toolkit\\I18n' => __DIR__ . '/../..' . '/src/Toolkit/I18n.php',
'Kirby\\Toolkit\\Iterator' => __DIR__ . '/../..' . '/src/Toolkit/Iterator.php',
'Kirby\\Toolkit\\Locale' => __DIR__ . '/../..' . '/src/Toolkit/Locale.php',
'Kirby\\Toolkit\\Mime' => __DIR__ . '/../..' . '/src/Toolkit/Mime.php',
'Kirby\\Toolkit\\Obj' => __DIR__ . '/../..' . '/src/Toolkit/Obj.php',
'Kirby\\Toolkit\\Pagination' => __DIR__ . '/../..' . '/src/Toolkit/Pagination.php',
@@ -365,11 +392,11 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7::$prefixDirsPsr4;
$loader->fallbackDirsPsr4 = ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7::$fallbackDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7::$prefixesPsr0;
$loader->classMap = ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitc26333d865e0329b638bdc17afd29896::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitc26333d865e0329b638bdc17afd29896::$prefixDirsPsr4;
$loader->fallbackDirsPsr4 = ComposerStaticInitc26333d865e0329b638bdc17afd29896::$fallbackDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInitc26333d865e0329b638bdc17afd29896::$prefixesPsr0;
$loader->classMap = ComposerStaticInitc26333d865e0329b638bdc17afd29896::$classMap;
}, null, ClassLoader::class);
}

146
kirby/vendor/composer/installed.php vendored Executable file
View File

@@ -0,0 +1,146 @@
<?php return array (
'root' =>
array (
'pretty_version' => '3.5.0-rc.5',
'version' => '3.5.0.0-RC5',
'aliases' =>
array (
),
'reference' => NULL,
'name' => 'getkirby/cms',
),
'versions' =>
array (
'claviska/simpleimage' =>
array (
'pretty_version' => '3.5.1',
'version' => '3.5.1.0',
'aliases' =>
array (
),
'reference' => 'ab2ab8a4672738ab77b39b00922ee4e79aeadb11',
),
'filp/whoops' =>
array (
'pretty_version' => '2.9.1',
'version' => '2.9.1.0',
'aliases' =>
array (
),
'reference' => '307fb34a5ab697461ec4c9db865b20ff2fd40771',
),
'getkirby/cms' =>
array (
'pretty_version' => '3.5.0-rc.5',
'version' => '3.5.0.0-RC5',
'aliases' =>
array (
),
'reference' => NULL,
),
'getkirby/composer-installer' =>
array (
'pretty_version' => '1.2.0',
'version' => '1.2.0.0',
'aliases' =>
array (
),
'reference' => '240a8b2c275d61b66601feb58222b7d34bc6cf1e',
),
'laminas/laminas-escaper' =>
array (
'pretty_version' => '2.7.0',
'version' => '2.7.0.0',
'aliases' =>
array (
),
'reference' => '5e04bc5ae5990b17159d79d331055e2c645e5cc5',
),
'laminas/laminas-zendframework-bridge' =>
array (
'pretty_version' => '1.1.1',
'version' => '1.1.1.0',
'aliases' =>
array (
),
'reference' => '6ede70583e101030bcace4dcddd648f760ddf642',
),
'league/color-extractor' =>
array (
'pretty_version' => '0.3.2',
'version' => '0.3.2.0',
'aliases' =>
array (
),
'reference' => '837086ec60f50c84c611c613963e4ad2e2aec806',
),
'matthecat/colorextractor' =>
array (
'replaced' =>
array (
0 => '*',
),
),
'michelf/php-smartypants' =>
array (
'pretty_version' => '1.8.1',
'version' => '1.8.1.0',
'aliases' =>
array (
),
'reference' => '47d17c90a4dfd0ccf1f87e25c65e6c8012415aad',
),
'mustangostang/spyc' =>
array (
'pretty_version' => '0.6.3',
'version' => '0.6.3.0',
'aliases' =>
array (
),
'reference' => '4627c838b16550b666d15aeae1e5289dd5b77da0',
),
'phpmailer/phpmailer' =>
array (
'pretty_version' => 'v6.2.0',
'version' => '6.2.0.0',
'aliases' =>
array (
),
'reference' => 'e38888a75c070304ca5514197d4847a59a5c853f',
),
'psr/log' =>
array (
'pretty_version' => '1.1.3',
'version' => '1.1.3.0',
'aliases' =>
array (
),
'reference' => '0f73288fd15629204f9d42b7055f72dacbe811fc',
),
'symfony/polyfill-mbstring' =>
array (
'pretty_version' => 'v1.20.0',
'version' => '1.20.0.0',
'aliases' =>
array (
),
'reference' => '39d483bdf39be819deabf04ec872eb0b2410b531',
),
'true/punycode' =>
array (
'pretty_version' => 'v2.1.1',
'version' => '2.1.1.0',
'aliases' =>
array (
),
'reference' => 'a4d0c11a36dd7f4e7cd7096076cab6d3378a071e',
),
'zendframework/zend-escaper' =>
array (
'replaced' =>
array (
0 => '^2.6.1',
),
),
),
);

View File

@@ -21,6 +21,7 @@ class Formatter
$response = [
'type' => get_class($exception),
'message' => $exception->getMessage(),
'code' => $exception->getCode(),
'file' => $exception->getFile(),
'line' => $exception->getLine(),
];

View File

@@ -251,7 +251,7 @@ class Inspector
return $traces;
}
if (!extension_loaded('xdebug') || !xdebug_is_enabled()) {
if (!extension_loaded('xdebug') || !function_exists('xdebug_is_enabled') || !xdebug_is_enabled()) {
return $traces;
}

View File

@@ -47,14 +47,14 @@ class PrettyPageHandler extends Handler
/**
* The name of the custom css file.
*
* @var string
* @var string|null
*/
private $customCss = null;
/**
* The name of the custom js file.
*
* @var string
* @var string|null
*/
private $customJs = null;
@@ -518,8 +518,8 @@ class PrettyPageHandler extends Handler
/**
* Determine if the editor link should act as an Ajax request.
*
* @param string $filePath
* @param int $line
* @param string $filePath
* @param int $line
*
* @throws UnexpectedValueException If editor resolver does not return a boolean
*
@@ -611,7 +611,7 @@ class PrettyPageHandler extends Handler
/**
* Adds a path to the list of paths to be searched for resources.
*
* @param string $path
* @param string $path
*
* @throws InvalidArgumentException If $path is not a valid directory
*
@@ -631,7 +631,7 @@ class PrettyPageHandler extends Handler
/**
* Adds a custom css file to be loaded.
*
* @param string $name
* @param string|null $name
*
* @return void
*/
@@ -643,7 +643,8 @@ class PrettyPageHandler extends Handler
/**
* Adds a custom js file to be loaded.
*
* @param string $name
* @param string|null $name
*
* @return void
*/
public function addCustomJs($name)
@@ -666,7 +667,7 @@ class PrettyPageHandler extends Handler
* way back to the first, enabling a cascading-type system of overrides for
* all resources.
*
* @param string $resource
* @param string $resource
*
* @throws RuntimeException If resource cannot be found in any of the available paths
*
@@ -760,9 +761,11 @@ class PrettyPageHandler extends Handler
/**
* blacklist a sensitive value within one of the superglobal arrays.
* Alias for the hideSuperglobalKey method.
*
* @param string $superGlobalName The name of the superglobal array, e.g. '_GET'
* @param string $key The key within the superglobal
* @see hideSuperglobalKey
*
* @return void
*/
@@ -771,6 +774,18 @@ class PrettyPageHandler extends Handler
$this->blacklist[$superGlobalName][] = $key;
}
/**
* Hide a sensitive value within one of the superglobal arrays.
*
* @param string $superGlobalName The name of the superglobal array, e.g. '_GET'
* @param string $key The key within the superglobal
* @return void
*/
public function hideSuperglobalKey($superGlobalName, $key)
{
return $this->blacklist($superGlobalName, $key);
}
/**
* Checks all values within the given superGlobal array.
*
@@ -778,7 +793,7 @@ class PrettyPageHandler extends Handler
* only '*' characters. We intentionally dont rely on $GLOBALS as it
* depends on the 'auto_globals_jit' php.ini setting.
*
* @param array $superGlobal One of the superglobal arrays
* @param array $superGlobal One of the superglobal arrays
* @param string $superGlobalName The name of the superglobal array, e.g. '_GET'
*
* @return array $values without sensitive data

View File

@@ -7,6 +7,7 @@
namespace Whoops;
use InvalidArgumentException;
use Throwable;
use Whoops\Exception\ErrorException;
use Whoops\Exception\Inspector;
use Whoops\Handler\CallbackHandler;
@@ -17,8 +18,19 @@ use Whoops\Util\SystemFacade;
final class Run implements RunInterface
{
/**
* @var bool
*/
private $isRegistered;
/**
* @var bool
*/
private $allowQuit = true;
/**
* @var bool
*/
private $sendOutput = true;
/**
@@ -31,17 +43,35 @@ final class Run implements RunInterface
*/
private $handlerStack = [];
/**
* @var array
* @psalm-var list<array{patterns: string, levels: int}>
*/
private $silencedPatterns = [];
/**
* @var SystemFacade
*/
private $system;
/**
* In certain scenarios, like in shutdown handler, we can not throw exceptions.
*
* @var bool
*/
private $canThrowExceptions = true;
public function __construct(SystemFacade $system = null)
{
$this->system = $system ?: new SystemFacade;
}
/**
* Explicitly request your handler runs as the last of all currently registered handlers
* Explicitly request your handler runs as the last of all currently registered handlers.
*
* @param HandlerInterface $handler
*
* @return Run
*/
public function appendHandler($handler)
{
@@ -50,7 +80,11 @@ final class Run implements RunInterface
}
/**
* Explicitly request your handler runs as the first of all currently registered handlers
* Explicitly request your handler runs as the first of all currently registered handlers.
*
* @param HandlerInterface $handler
*
* @return Run
*/
public function prependHandler($handler)
{
@@ -58,12 +92,14 @@ final class Run implements RunInterface
}
/**
* Register your handler as the last of all currently registered handlers.
* Register your handler as the last of all currently registered handlers (to be executed first).
* Prefer using appendHandler and prependHandler for clarity.
*
* @throws InvalidArgumentException If argument is not callable or instance of HandlerInterface
* @param Callable|HandlerInterface $handler
* @param Callable|HandlerInterface $handler
*
* @return Run
*
* @throws InvalidArgumentException If argument is not callable or instance of HandlerInterface.
*/
public function pushHandler($handler)
{
@@ -72,17 +108,21 @@ final class Run implements RunInterface
}
/**
* See removeFirstHandler and removeLastHandler
* @return null|HandlerInterface
* Removes and returns the last handler pushed to the handler stack.
*
* @see Run::removeFirstHandler(), Run::removeLastHandler()
*
* @return HandlerInterface|null
*/
public function popHandler()
{
return array_pop($this->handlerStack);
}
/**
* Removes the first handler
* Removes the first handler.
*
* @return void
*/
public function removeFirstHandler()
{
@@ -90,7 +130,9 @@ final class Run implements RunInterface
}
/**
* Removes the last handler
* Removes the last handler.
*
* @return void
*/
public function removeLastHandler()
{
@@ -98,8 +140,8 @@ final class Run implements RunInterface
}
/**
* Returns an array with all handlers, in the
* order they were added to the stack.
* Returns an array with all handlers, in the order they were added to the stack.
*
* @return array
*/
public function getHandlers()
@@ -108,8 +150,8 @@ final class Run implements RunInterface
}
/**
* Clears all handlers in the handlerStack, including
* the default PrettyPage handler.
* Clears all handlers in the handlerStack, including the default PrettyPage handler.
*
* @return Run
*/
public function clearHandlers()
@@ -118,17 +160,9 @@ final class Run implements RunInterface
return $this;
}
/**
* @param \Throwable $exception
* @return Inspector
*/
private function getInspector($exception)
{
return new Inspector($exception);
}
/**
* Registers this instance as an error handler.
*
* @return Run
*/
public function register()
@@ -152,7 +186,8 @@ final class Run implements RunInterface
}
/**
* Unregisters all handlers registered by this Whoops\Run instance
* Unregisters all handlers registered by this Whoops\Run instance.
*
* @return Run
*/
public function unregister()
@@ -169,7 +204,9 @@ final class Run implements RunInterface
/**
* Should Whoops allow Handlers to force the script to quit?
* @param bool|int $exit
*
* @param bool|int $exit
*
* @return bool
*/
public function allowQuit($exit = null)
@@ -182,10 +219,12 @@ final class Run implements RunInterface
}
/**
* Silence particular errors in particular files
* @param array|string $patterns List or a single regex pattern to match
* @param int $levels Defaults to E_STRICT | E_DEPRECATED
* @return \Whoops\Run
* Silence particular errors in particular files.
*
* @param array|string $patterns List or a single regex pattern to match.
* @param int $levels Defaults to E_STRICT | E_DEPRECATED.
*
* @return Run
*/
public function silenceErrorsInPaths($patterns, $levels = 10240)
{
@@ -201,12 +240,12 @@ final class Run implements RunInterface
(array) $patterns
)
);
return $this;
}
/**
* Returns an array with silent errors in path configuration
* Returns an array with silent errors in path configuration.
*
* @return array
*/
@@ -215,13 +254,16 @@ final class Run implements RunInterface
return $this->silencedPatterns;
}
/*
/**
* Should Whoops send HTTP error code to the browser if possible?
* Whoops will by default send HTTP code 500, but you may wish to
* use 502, 503, or another 5xx family code.
*
* @param bool|int $code
*
* @return int|false
*
* @throws InvalidArgumentException
*/
public function sendHttpCode($code = null)
{
@@ -239,7 +281,7 @@ final class Run implements RunInterface
if ($code < 400 || 600 <= $code) {
throw new InvalidArgumentException(
"Invalid status code '$code', must be 4xx or 5xx"
"Invalid status code '$code', must be 4xx or 5xx"
);
}
@@ -248,8 +290,10 @@ final class Run implements RunInterface
/**
* Should Whoops push output directly to the client?
* If this is false, output will be returned by handleException
* @param bool|int $send
* If this is false, output will be returned by handleException.
*
* @param bool|int $send
*
* @return bool
*/
public function writeToOutput($send = null)
@@ -262,11 +306,11 @@ final class Run implements RunInterface
}
/**
* Handles an exception, ultimately generating a Whoops error
* page.
* Handles an exception, ultimately generating a Whoops error page.
*
* @param \Throwable $exception
* @return string Output generated by handlers
* @param Throwable $exception
*
* @return string Output generated by handlers.
*/
public function handleException($exception)
{
@@ -343,17 +387,17 @@ final class Run implements RunInterface
}
/**
* Converts generic PHP errors to \ErrorException
* instances, before passing them off to be handled.
* Converts generic PHP errors to \ErrorException instances, before passing them off to be handled.
*
* This method MUST be compatible with set_error_handler.
*
* @param int $level
* @param string $message
* @param string $file
* @param int $line
* @param int $level
* @param string $message
* @param string|null $file
* @param int|null $line
*
* @return bool
*
* @throws ErrorException
*/
public function handleError($level, $message, $file = null, $line = null)
@@ -388,6 +432,8 @@ final class Run implements RunInterface
/**
* Special case to deal with Fatal errors and the like.
*
* @return void
*/
public function handleShutdown()
{
@@ -411,11 +457,24 @@ final class Run implements RunInterface
}
/**
* In certain scenarios, like in shutdown handler, we can not throw exceptions
* @var bool
* @param Throwable $exception
*
* @return Inspector
*/
private $canThrowExceptions = true;
private function getInspector($exception)
{
return new Inspector($exception);
}
/**
* Resolves the giving handler.
*
* @param HandlerInterface $handler
*
* @return HandlerInterface
*
* @throws InvalidArgumentException
*/
private function resolveHandler($handler)
{
if (is_callable($handler)) {
@@ -424,7 +483,7 @@ final class Run implements RunInterface
if (!$handler instanceof HandlerInterface) {
throw new InvalidArgumentException(
"Handler must be a callable, or instance of "
"Handler must be a callable, or instance of "
. "Whoops\\Handler\\HandlerInterface"
);
}
@@ -433,13 +492,15 @@ final class Run implements RunInterface
}
/**
* Echo something to the browser
* @param string $output
* @return $this
* Echo something to the browser.
*
* @param string $output
*
* @return Run
*/
private function writeToOutputNow($output)
{
if ($this->sendHttpCode() && \Whoops\Util\Misc::canSendHeaders()) {
if ($this->sendHttpCode() && Misc::canSendHeaders()) {
$this->system->setHttpResponseCode(
$this->sendHttpCode()
);

3050
kirby/vendor/getkirby/composer-installer/composer.lock generated vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -2,23 +2,23 @@
namespace Kirby\ComposerInstaller;
use InvalidArgumentException;
use Composer\Config;
use Composer\Package\PackageInterface;
use InvalidArgumentException;
/**
* @package Kirby Composer Installer
* @author Lukas Bestle <lukas@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier
* @license MIT
* @copyright Bastian Allgeier GmbH
* @license https://opensource.org/licenses/MIT
*/
class CmsInstaller extends Installer
{
/**
* Decides if the installer supports the given type
*
* @param string $packageType
* @param string $packageType
* @return bool
*/
public function supports($packageType): bool
@@ -29,8 +29,8 @@ class CmsInstaller extends Installer
/**
* Returns the installation path of a package
*
* @param PackageInterface $package
* @return string path
* @param PackageInterface $package
* @return string path
*/
public function getInstallPath(PackageInterface $package): string
{

View File

@@ -2,24 +2,25 @@
namespace Kirby\ComposerInstaller;
use RuntimeException;
use Composer\Installer\LibraryInstaller;
use Composer\Package\PackageInterface;
use Composer\Repository\InstalledRepositoryInterface;
use React\Promise\PromiseInterface;
use RuntimeException;
/**
* @package Kirby Composer Installer
* @author Lukas Bestle <lukas@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier
* @license MIT
* @copyright Bastian Allgeier GmbH
* @license https://opensource.org/licenses/MIT
*/
class Installer extends LibraryInstaller
{
/**
* Decides if the installer supports the given type
*
* @param string $packageType
* @param string $packageType
* @return bool
*/
public function supports($packageType): bool
@@ -30,34 +31,54 @@ class Installer extends LibraryInstaller
/**
* Installs specific package.
*
* @param InstalledRepositoryInterface $repo repository in which to check
* @param PackageInterface $package package instance
* @param InstalledRepositoryInterface $repo repository in which to check
* @param PackageInterface $package package instance
*/
public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
{
// first install the package normally...
parent::install($repo, $package);
$promise = parent::install($repo, $package);
// ...then run custom code
$this->postInstall($package);
$postInstall = function () use ($package) {
$this->postInstall($package);
};
// Composer 2 in async mode
if ($promise instanceof PromiseInterface) {
return $promise->then($postInstall);
}
// Composer 1 or Composer 2 without async
$postInstall();
}
/**
* Updates specific package.
*
* @param InstalledRepositoryInterface $repo repository in which to check
* @param PackageInterface $initial already installed package version
* @param PackageInterface $target updated version
* @param InstalledRepositoryInterface $repo repository in which to check
* @param PackageInterface $initial already installed package version
* @param PackageInterface $target updated version
*
* @throws InvalidArgumentException if $initial package is not installed
*/
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
{
// first update the package normally...
parent::update($repo, $initial, $target);
$promise = parent::update($repo, $initial, $target);
// ...then run custom code
$this->postInstall($target);
$postInstall = function () use ($target) {
$this->postInstall($target);
};
// Composer 2 in async mode
if ($promise instanceof PromiseInterface) {
return $promise->then($postInstall);
}
// Composer 1 or Composer 2 without async
$postInstall();
}
/**

View File

@@ -10,15 +10,15 @@ use Composer\Plugin\PluginInterface;
* @package Kirby Composer Installer
* @author Lukas Bestle <lukas@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier
* @license MIT
* @copyright Bastian Allgeier GmbH
* @license https://opensource.org/licenses/MIT
*/
class Plugin implements PluginInterface
{
/**
* Apply plugin modifications to Composer
*
* @param Composer $composer
* @param Composer $composer
* @param IOInterface $io
*/
public function activate(Composer $composer, IOInterface $io)
@@ -27,4 +27,28 @@ class Plugin implements PluginInterface
$installationManager->addInstaller(new CmsInstaller($io, $composer));
$installationManager->addInstaller(new PluginInstaller($io, $composer));
}
/**
* Remove any hooks from Composer
* @codeCoverageIgnore
*
* @param Composer $composer
* @param IOInterface $io
*/
public function deactivate(Composer $composer, IOInterface $io)
{
// nothing to do
}
/**
* Prepare the plugin to be uninstalled
* @codeCoverageIgnore
*
* @param Composer $composer
* @param IOInterface $io
*/
public function uninstall(Composer $composer, IOInterface $io)
{
// nothing to do
}
}

View File

@@ -8,15 +8,15 @@ use Composer\Package\PackageInterface;
* @package Kirby Composer Installer
* @author Lukas Bestle <lukas@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier
* @license MIT
* @copyright Bastian Allgeier GmbH
* @license https://opensource.org/licenses/MIT
*/
class PluginInstaller extends Installer
{
/**
* Decides if the installer supports the given type
*
* @param string $packageType
* @param string $packageType
* @return bool
*/
public function supports($packageType): bool
@@ -27,8 +27,8 @@ class PluginInstaller extends Installer
/**
* Returns the installation path of a package
*
* @param PackageInterface $package
* @return string path
* @param PackageInterface $package
* @return string path
*/
public function getInstallPath(PackageInterface $package): string
{
@@ -85,7 +85,7 @@ class PluginInstaller extends Installer
* otherwise (if the Pluginkit is not yet supported by the plugin)
* the installer will fall back to the behavior of the LibraryInstaller
*
* @param PackageInterface $package
* @param PackageInterface $package
* @return bool
*/
protected function supportsPluginkit(PackageInterface $package): bool

View File

@@ -66,7 +66,7 @@ class Autoloader
*/
private static function getClassLoader()
{
if (file_exists(getenv('COMPOSER_VENDOR_DIR') . '/autoload.php')) {
if (getenv('COMPOSER_VENDOR_DIR') && file_exists(getenv('COMPOSER_VENDOR_DIR') . '/autoload.php')) {
return include getenv('COMPOSER_VENDOR_DIR') . '/autoload.php';
}

View File

@@ -1,4 +1,5 @@
<?php
/**
* PHPMailer - PHP email creation and transport class.
* PHP Version 5.5
@@ -8,7 +9,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2017 Marcus Bointon
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
@@ -16,6 +17,7 @@
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
* Get an OAuth2 token from an OAuth2 provider.
* * Install this script on your server so that it's accessible
@@ -44,7 +46,7 @@ use Hayageek\OAuth2\Client\Provider\Yahoo;
use Stevenmaguire\OAuth2\Client\Provider\Microsoft;
if (!isset($_GET['code']) && !isset($_GET['provider'])) {
?>
?>
<html>
<body>Select Provider:<br/>
<a href='?provider=Google'>Google</a><br/>
@@ -52,8 +54,8 @@ if (!isset($_GET['code']) && !isset($_GET['provider'])) {
<a href='?provider=Microsoft'>Microsoft/Outlook/Hotmail/Live/Office365</a><br/>
</body>
</html>
<?php
exit;
<?php
exit;
}
require 'vendor/autoload.php';

View File

@@ -1,4 +1,5 @@
<?php
/**
* Afrikaans PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Arabic PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Azerbaijani PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Bosnian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@@ -23,4 +24,4 @@ $PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP server nije uspjelo.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP greška: ';
$PHPMAILER_LANG['variable_set'] = 'Nije moguće postaviti varijablu ili je vratiti nazad: ';
$PHPMAILER_LANG['extension_missing'] = 'Nedostaje ekstenzija: ';
$PHPMAILER_LANG['extension_missing'] = 'Nedostaje ekstenzija: ';

View File

@@ -1,4 +1,5 @@
<?php
/**
* Belarusian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Bulgarian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Catalan PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Chinese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Czech PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,10 +1,11 @@
<?php
/**
* Danish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author John Sebastian <jms@iwb.dk>
* Rewrite and extension of the work by Mikael Stokkebro <info@stokkebro.dk>
*
* Rewrite and extension of the work by Mikael Stokkebro <info@stokkebro.dk>
*
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Login mislykkedes.';

View File

@@ -1,4 +1,5 @@
<?php
/**
* German PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@@ -15,6 +16,8 @@ $PHPMAILER_LANG['file_open'] = 'Dateifehler: Konnte folgende Datei ni
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
$PHPMAILER_LANG['instantiate'] = 'Mail-Funktion konnte nicht initialisiert werden.';
$PHPMAILER_LANG['invalid_address'] = 'Die Adresse ist ungültig: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'Ungültiger Hosteintrag: ';
$PHPMAILER_LANG['invalid_host'] = 'Ungültiger Host: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfängeradresse an.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-Fehler: Die folgenden Empfänger sind nicht korrekt: ';

View File

@@ -1,4 +1,5 @@
<?php
/**
* Greek PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Esperanto PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Spanish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Estonian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Persian/Farsi PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Finnish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Faroese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* French PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@@ -19,6 +20,8 @@ $PHPMAILER_LANG['file_open'] = 'Ouverture du fichier impossible: '
$PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expéditeur suivante a échoué: ';
$PHPMAILER_LANG['instantiate'] = 'Impossible d\'instancier la fonction mail.';
$PHPMAILER_LANG['invalid_address'] = 'L\'adresse courriel n\'est pas valide: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'L\'entrée hôte n\'est pas valide: ';
$PHPMAILER_LANG['invalid_host'] = 'L\'hôte n\'est pas valide: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.';
$PHPMAILER_LANG['provide_address'] = 'Vous devez fournir au moins une adresse de destinataire.';
$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP: les destinataires suivants sont en erreur: ';

View File

@@ -1,4 +1,5 @@
<?php
/**
* Galician PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Hebrew PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,10 +1,11 @@
<?php
/**
* Hindi PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Yash Karanke <mr.karanke@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP त्रुटि: प्रामाणिकता की जांच नहीं हो सका। ';
$PHPMAILER_LANG['connect_host'] = 'SMTP त्रुटि: SMTP सर्वर से कनेक्ट नहीं हो सका। ';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP त्रुटि: डेटा स्वीकार नहीं किया जाता है। ';

View File

@@ -1,4 +1,5 @@
<?php
/**
* Croatian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Hungarian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,10 +1,11 @@
<?php
/**
* Armenian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Hrayr Grigoryan <hrayr@bits.am>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP -ի սխալ: չհաջողվեց ստուգել իսկությունը.';
$PHPMAILER_LANG['connect_host'] = 'SMTP -ի սխալ: չհաջողվեց կապ հաստատել SMTP սերվերի հետ.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP -ի սխալ: տվյալները ընդունված չեն.';

View File

@@ -1,9 +1,11 @@
<?php
/**
* Indonesian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Cecep Prawiro <cecep.prawiro@gmail.com>
* @author @januridp
* @author Ian Mustafa <mail@ianmustafa.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Kesalahan SMTP: Tidak dapat mengotentikasi.';
@@ -11,17 +13,19 @@ $PHPMAILER_LANG['connect_host'] = 'Kesalahan SMTP: Tidak dapat terhubung
$PHPMAILER_LANG['data_not_accepted'] = 'Kesalahan SMTP: Data tidak diterima.';
$PHPMAILER_LANG['empty_message'] = 'Isi pesan kosong';
$PHPMAILER_LANG['encoding'] = 'Pengkodean karakter tidak dikenali: ';
$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses : ';
$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas : ';
$PHPMAILER_LANG['file_open'] = 'Kesalahan File: Berkas tidak dapat dibuka : ';
$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan kesalahan : ';
$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi surel';
$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat surel tidak benar : ';
$PHPMAILER_LANG['provide_address'] = 'Harus disediakan minimal satu alamat tujuan';
$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses: ';
$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas: ';
$PHPMAILER_LANG['file_open'] = 'Kesalahan Berkas: Berkas tidak dapat dibuka: ';
$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan kesalahan: ';
$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi surel.';
$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat surel tidak sesuai: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'Gagal terkirim, entri host tidak sesuai: ';
$PHPMAILER_LANG['invalid_host'] = 'Gagal terkirim, host tidak sesuai: ';
$PHPMAILER_LANG['provide_address'] = 'Harus tersedia minimal satu alamat tujuan';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer tidak didukung';
$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menghasilkan kesalahan : ';
$PHPMAILER_LANG['signing'] = 'Kesalahan dalam tanda tangan : ';
$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menyebabkan kesalahan: ';
$PHPMAILER_LANG['signing'] = 'Kesalahan dalam penandatangan SSL: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() gagal.';
$PHPMAILER_LANG['smtp_error'] = 'Kesalahan pada pelayan SMTP : ';
$PHPMAILER_LANG['variable_set'] = 'Tidak dapat mengatur atau mengatur ulang variable : ';
$PHPMAILER_LANG['extension_missing'] = 'Ekstensi hilang: ';
$PHPMAILER_LANG['smtp_error'] = 'Kesalahan pada pelayan SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Tidak dapat mengatur atau mengatur ulang variabel: ';
$PHPMAILER_LANG['extension_missing'] = 'Ekstensi PHP tidak tersedia: ';

View File

@@ -1,4 +1,5 @@
<?php
/**
* Italian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Japanese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Georgian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Korean PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Lithuanian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Latvian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,9 +1,11 @@
<?php
/**
* Malagasy PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Hackinet <piyushjha8164@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Hadisoana SMTP: Tsy nahomby ny fanamarinana.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Tsy afaka mampifandray amin\'ny mpampiantrano SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP diso: tsy voarakitra ny angona.';

View File

@@ -1,4 +1,5 @@
<?php
/**
* Malaysian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Norwegian Bokmål PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Dutch PHPMailer language file: refer to PHPMailer.php for definitive list.
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Polish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@@ -14,7 +15,7 @@ $PHPMAILER_LANG['file_access'] = 'Brak dostępu do pliku: ';
$PHPMAILER_LANG['file_open'] = 'Nie można otworzyć pliku: ';
$PHPMAILER_LANG['from_failed'] = 'Następujący adres Nadawcy jest nieprawidłowy: ';
$PHPMAILER_LANG['instantiate'] = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.';
$PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, '.
$PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, ' .
'następujący adres Odbiorcy jest nieprawidłowy: ';
$PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email Odbiorcy.';
$PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.';

View File

@@ -1,4 +1,5 @@
<?php
/**
* Portuguese (European) PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Brazilian Portuguese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Romanian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Russian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Slovak PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,9 +1,11 @@
<?php
/**
* Slovene PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Klemen Tušar <techouse@gmail.com>
* @author Filip Š <projects@filips.si>
* @author Blaž Oražem <blaz@orazem.si>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.';
@@ -17,8 +19,10 @@ $PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: ';
$PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: ';
$PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.';
$PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'Neveljaven vnos gostitelja: ';
$PHPMAILER_LANG['invalid_host'] = 'Neveljaven gostitelj: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.';
$PHPMAILER_LANG['provide_address'] = 'Prosim vnesite vsaj enega naslovnika.';
$PHPMAILER_LANG['provide_address'] = 'Prosimo, vnesite vsaj enega naslovnika.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: ';
$PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.';

View File

@@ -1,4 +1,5 @@
<?php
/**
* Serbian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Swedish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@@ -19,8 +20,8 @@ $PHPMAILER_LANG['invalid_address'] = 'Felaktig adress: ';
$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: ';
$PHPMAILER_LANG['signing'] = 'Signerings fel: ';
$PHPMAILER_LANG['signing'] = 'Signeringsfel: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() misslyckades.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP server fel: ';
$PHPMAILER_LANG['smtp_error'] = 'SMTP serverfel: ';
$PHPMAILER_LANG['variable_set'] = 'Kunde inte definiera eller återställa variabel: ';
$PHPMAILER_LANG['extension_missing'] = 'Tillägg ej tillgängligt: ';

View File

@@ -1,27 +1,28 @@
<?php
/**
* Tagalog PHPMailer language file: refer to English translation for definitive list
*
* @package PHPMailer
* @author Adriane Justine Tan <adrianetan12@gmail.com>
* @author Adriane Justine Tan <eidoriantan@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Hindi mapatotohanan.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Hindi makakonekta sa SMTP host.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Ang datos ay hindi maaaring matatanggap.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Ang datos ay hindi naitanggap.';
$PHPMAILER_LANG['empty_message'] = 'Walang laman ang mensahe';
$PHPMAILER_LANG['encoding'] = 'Hindi alam ang encoding: ';
$PHPMAILER_LANG['execute'] = 'Hindi maisasagawa: ';
$PHPMAILER_LANG['file_access'] = 'Hindi ma-access ang file: ';
$PHPMAILER_LANG['file_open'] = 'Hindi mabuksan ang file: ';
$PHPMAILER_LANG['file_open'] = 'File Error: Hindi mabuksan ang file: ';
$PHPMAILER_LANG['from_failed'] = 'Ang sumusunod na address ay nabigo: ';
$PHPMAILER_LANG['instantiate'] = 'Hindi maaaring magbigay ng institusyon ang mail';
$PHPMAILER_LANG['instantiate'] = 'Hindi maisimulan ang instance ng mail function.';
$PHPMAILER_LANG['invalid_address'] = 'Hindi wasto ang address na naibigay: ';
$PHPMAILER_LANG['mailer_not_supported'] = 'Ang mailer ay hindi suportado';
$PHPMAILER_LANG['provide_address'] = 'Kailangan mong magbigay ng kahit isang email address na tatanggap';
$PHPMAILER_LANG['mailer_not_supported'] = 'Ang mailer ay hindi suportado.';
$PHPMAILER_LANG['provide_address'] = 'Kailangan mong magbigay ng kahit isang email address na tatanggap.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Ang mga sumusunod na tatanggap ay nabigo: ';
$PHPMAILER_LANG['signing'] = 'Hindi ma-sign';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ang SMTP connect() ay nabigo';
$PHPMAILER_LANG['smtp_error'] = 'Ang server ng SMTP ay nabigo';
$PHPMAILER_LANG['variable_set'] = 'Hindi matatakda ang mga variables: ';
$PHPMAILER_LANG['extension_missing'] = 'Nawawala ang extension';
$PHPMAILER_LANG['signing'] = 'Hindi ma-sign: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ang SMTP connect() ay nabigo.';
$PHPMAILER_LANG['smtp_error'] = 'Ang server ng SMTP ay nabigo: ';
$PHPMAILER_LANG['variable_set'] = 'Hindi matatakda o ma-reset ang mga variables: ';
$PHPMAILER_LANG['extension_missing'] = 'Nawawala ang extension: ';

View File

@@ -1,4 +1,5 @@
<?php
/**
* Turkish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Ukrainian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Vietnamese (Tiếng Việt) PHPMailer language file: refer to English translation for definitive list.
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Traditional Chinese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* Simplified Chinese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@@ -1,4 +1,5 @@
<?php
/**
* PHPMailer Exception class.
* PHP Version 5.5.
@@ -9,7 +10,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2017 Marcus Bointon
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License

View File

@@ -1,4 +1,5 @@
<?php
/**
* PHPMailer - PHP email creation and transport class.
* PHP Version 5.5.
@@ -9,7 +10,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2015 Marcus Bointon
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License

View File

@@ -1,4 +1,5 @@
<?php
/**
* PHPMailer - PHP email creation and transport class.
* PHP Version 5.5.
@@ -9,7 +10,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2019 Marcus Bointon
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
@@ -388,11 +389,11 @@ class PHPMailer
* SMTP class debug output mode.
* Debug output level.
* Options:
* * SMTP::DEBUG_OFF: No output
* * SMTP::DEBUG_CLIENT: Client messages
* * SMTP::DEBUG_SERVER: Client and server messages
* * SMTP::DEBUG_CONNECTION: As SERVER plus connection status
* * SMTP::DEBUG_LOWLEVEL: Noisy, low-level data output, rarely needed
* @see SMTP::DEBUG_OFF: No output
* @see SMTP::DEBUG_CLIENT: Client messages
* @see SMTP::DEBUG_SERVER: Client and server messages
* @see SMTP::DEBUG_CONNECTION: As SERVER plus connection status
* @see SMTP::DEBUG_LOWLEVEL: Noisy, low-level data output, rarely needed
*
* @see SMTP::$do_debug
*
@@ -441,6 +442,8 @@ class PHPMailer
* Only supported in `mail` and `sendmail` transports, not in SMTP.
*
* @var bool
*
* @deprecated 6.0.0 PHPMailer isn't a mailing list manager!
*/
public $SingleTo = false;
@@ -745,7 +748,7 @@ class PHPMailer
*
* @var string
*/
const VERSION = '6.1.6';
const VERSION = '6.2.0';
/**
* Error severity: message only, continue processing.
@@ -897,6 +900,7 @@ class PHPMailer
switch ($this->Debugoutput) {
case 'error_log':
//Don't output, just log
/** @noinspection ForgottenDebugOutputInspection */
error_log($str);
break;
case 'html':
@@ -1182,9 +1186,11 @@ class PHPMailer
//Use this built-in parser if it's available
$list = imap_rfc822_parse_adrlist($addrstr, '');
foreach ($list as $address) {
if (('.SYNTAX-ERROR.' !== $address->host) && static::validateAddress(
$address->mailbox . '@' . $address->host
)) {
if (
('.SYNTAX-ERROR.' !== $address->host) && static::validateAddress(
$address->mailbox . '@' . $address->host
)
) {
$addresses[] = [
'name' => (property_exists($address, 'personal') ? $address->personal : ''),
'address' => $address->mailbox . '@' . $address->host,
@@ -1238,7 +1244,8 @@ class PHPMailer
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
// Don't validate now addresses with IDN. Will be done in send().
$pos = strrpos($address, '@');
if ((false === $pos)
if (
(false === $pos)
|| ((!$this->has8bitChars(substr($address, ++$pos)) || !static::idnSupported())
&& !static::validateAddress($address))
) {
@@ -1307,7 +1314,7 @@ class PHPMailer
$patternselect = static::$validator;
}
if (is_callable($patternselect)) {
return $patternselect($address);
return call_user_func($patternselect, $address);
}
//Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
if (strpos($address, "\n") !== false || strpos($address, "\r") !== false) {
@@ -1348,7 +1355,7 @@ class PHPMailer
/*
* This is the pattern used in the HTML5 spec for validation of 'email' type form input elements.
*
* @see http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email)
* @see https://html.spec.whatwg.org/#e-mail-state-(type=email)
*/
return (bool) preg_match(
'/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' .
@@ -1390,7 +1397,8 @@ class PHPMailer
{
// Verify we have required functions, CharSet, and at-sign.
$pos = strrpos($address, '@');
if (!empty($this->CharSet) &&
if (
!empty($this->CharSet) &&
false !== $pos &&
static::idnSupported()
) {
@@ -1452,8 +1460,9 @@ class PHPMailer
*/
public function preSend()
{
if ('smtp' === $this->Mailer
|| ('mail' === $this->Mailer && stripos(PHP_OS, 'WIN') === 0)
if (
'smtp' === $this->Mailer
|| ('mail' === $this->Mailer && (PHP_VERSION_ID >= 80000 || stripos(PHP_OS, 'WIN') === 0))
) {
//SMTP mandates RFC-compliant line endings
//and it's also used with mail() on Windows
@@ -1463,7 +1472,8 @@ class PHPMailer
static::setLE(PHP_EOL);
}
//Check for buggy PHP versions that add a header with an incorrect line break
if ('mail' === $this->Mailer
if (
'mail' === $this->Mailer
&& ((PHP_VERSION_ID >= 70000 && PHP_VERSION_ID < 70017)
|| (PHP_VERSION_ID >= 70100 && PHP_VERSION_ID < 70103))
&& ini_get('mail.add_x_header') === '1'
@@ -1550,7 +1560,8 @@ class PHPMailer
}
// Sign with DKIM if enabled
if (!empty($this->DKIM_domain)
if (
!empty($this->DKIM_domain)
&& !empty($this->DKIM_selector)
&& (!empty($this->DKIM_private_string)
|| (!empty($this->DKIM_private)
@@ -1607,6 +1618,9 @@ class PHPMailer
return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
}
} catch (Exception $exc) {
if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true) {
$this->smtp->reset();
}
$this->setError($exc->getMessage());
$this->edebug($exc->getMessage());
if ($this->exceptions) {
@@ -1711,7 +1725,8 @@ class PHPMailer
protected static function isShellSafe($string)
{
// Future-proof
if (escapeshellcmd($string) !== $string
if (
escapeshellcmd($string) !== $string
|| !in_array(escapeshellarg($string), ["'$string'", "\"$string\""])
) {
return false;
@@ -1747,6 +1762,23 @@ class PHPMailer
return !preg_match('#^[a-z]+://#i', $path);
}
/**
* Check whether a file path is safe, accessible, and readable.
*
* @param string $path A relative or absolute path to a file
*
* @return bool
*/
protected static function fileIsAccessible($path)
{
$readable = file_exists($path);
//If not a UNC path (expected to start with \\), check read permission, see #2069
if (strpos($path, '\\\\') !== 0) {
$readable = $readable && is_readable($path);
}
return static::isPermittedPath($path) && $readable;
}
/**
* Send mail using the PHP mail() function.
*
@@ -1878,7 +1910,7 @@ class PHPMailer
$isSent = true;
}
$callbacks[] = ['issent'=>$isSent, 'to'=>$to[0]];
$callbacks[] = ['issent' => $isSent, 'to' => $to[0]];
}
}
@@ -1958,11 +1990,13 @@ class PHPMailer
foreach ($hosts as $hostentry) {
$hostinfo = [];
if (!preg_match(
'/^(?:(ssl|tls):\/\/)?(.+?)(?::(\d+))?$/',
trim($hostentry),
$hostinfo
)) {
if (
!preg_match(
'/^(?:(ssl|tls):\/\/)?(.+?)(?::(\d+))?$/',
trim($hostentry),
$hostinfo
)
) {
$this->edebug($this->lang('invalid_hostentry') . ' ' . trim($hostentry));
// Not a valid host entry
continue;
@@ -2000,7 +2034,12 @@ class PHPMailer
}
$host = $hostinfo[2];
$port = $this->Port;
if (array_key_exists(3, $hostinfo) && is_numeric($hostinfo[3]) && $hostinfo[3] > 0 && $hostinfo[3] < 65536) {
if (
array_key_exists(3, $hostinfo) &&
is_numeric($hostinfo[3]) &&
$hostinfo[3] > 0 &&
$hostinfo[3] < 65536
) {
$port = (int) $hostinfo[3];
}
if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) {
@@ -2026,12 +2065,14 @@ class PHPMailer
// We must resend EHLO after TLS negotiation
$this->smtp->hello($hello);
}
if ($this->SMTPAuth && !$this->smtp->authenticate(
$this->Username,
$this->Password,
$this->AuthType,
$this->oauth
)) {
if (
$this->SMTPAuth && !$this->smtp->authenticate(
$this->Username,
$this->Password,
$this->AuthType,
$this->oauth
)
) {
throw new Exception($this->lang('authenticate'));
}
@@ -2089,7 +2130,7 @@ class PHPMailer
'am' => 'hy',
];
if (isset($renamed_langcodes[$langcode])) {
if (array_key_exists($langcode, $renamed_langcodes)) {
$langcode = $renamed_langcodes[$langcode];
}
@@ -2130,7 +2171,7 @@ class PHPMailer
// There is no English translation file
if ('en' !== $langcode) {
// Make sure language file path is readable
if (!static::isPermittedPath($lang_file) || !file_exists($lang_file)) {
if (!static::fileIsAccessible($lang_file)) {
$foundlang = false;
} else {
// Overwrite language-specific strings.
@@ -2378,21 +2419,18 @@ class PHPMailer
$result .= $this->headerLine('Date', '' === $this->MessageDate ? self::rfcDate() : $this->MessageDate);
// To be created automatically by mail()
if ($this->SingleTo) {
if ('mail' !== $this->Mailer) {
// The To header is created automatically by mail(), so needs to be omitted here
if ('mail' !== $this->Mailer) {
if ($this->SingleTo) {
foreach ($this->to as $toaddr) {
$this->SingleToArray[] = $this->addrFormat($toaddr);
}
}
} elseif (count($this->to) > 0) {
if ('mail' !== $this->Mailer) {
} elseif (count($this->to) > 0) {
$result .= $this->addrAppend('To', $this->to);
} elseif (count($this->cc) === 0) {
$result .= $this->headerLine('To', 'undisclosed-recipients:;');
}
} elseif (count($this->cc) === 0) {
$result .= $this->headerLine('To', 'undisclosed-recipients:;');
}
$result .= $this->addrAppend('From', [[trim($this->From), $this->FromName]]);
// sendmail and mail() extract Cc from the header before sending
@@ -2401,7 +2439,8 @@ class PHPMailer
}
// sendmail and mail() extract Bcc from the header before sending
if ((
if (
(
'sendmail' === $this->Mailer || 'qmail' === $this->Mailer || 'mail' === $this->Mailer
)
&& count($this->bcc) > 0
@@ -2947,7 +2986,7 @@ class PHPMailer
* @param string $path Path to the attachment
* @param string $name Overrides the attachment name
* @param string $encoding File encoding (see $Encoding)
* @param string $type File extension (MIME) type
* @param string $type MIME type, e.g. `image/jpeg`; determined automatically from $path if not specified
* @param string $disposition Disposition to use
*
* @throws Exception
@@ -2962,7 +3001,7 @@ class PHPMailer
$disposition = 'attachment'
) {
try {
if (!static::isPermittedPath($path) || !@is_file($path) || !is_readable($path)) {
if (!static::fileIsAccessible($path)) {
throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE);
}
@@ -2975,7 +3014,6 @@ class PHPMailer
if ('' === $name) {
$name = $filename;
}
if (!$this->validateEncoding($encoding)) {
throw new Exception($this->lang('encoding') . $encoding);
}
@@ -3137,7 +3175,7 @@ class PHPMailer
protected function encodeFile($path, $encoding = self::ENCODING_BASE64)
{
try {
if (!static::isPermittedPath($path) || !file_exists($path) || !is_readable($path)) {
if (!static::fileIsAccessible($path)) {
throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE);
}
$file_buffer = file_get_contents($path);
@@ -3523,7 +3561,7 @@ class PHPMailer
$disposition = 'inline'
) {
try {
if (!static::isPermittedPath($path) || !@is_file($path) || !is_readable($path)) {
if (!static::fileIsAccessible($path)) {
throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE);
}
@@ -3872,7 +3910,8 @@ class PHPMailer
public static function isValidHost($host)
{
//Simple syntax limits
if (empty($host)
if (
empty($host)
|| !is_string($host)
|| strlen($host) > 256
|| !preg_match('/^([a-zA-Z\d.-]*|\[[a-fA-F\d:]+])$/', $host)
@@ -3990,7 +4029,8 @@ class PHPMailer
* @param string $message HTML message string
* @param string $basedir Absolute path to a base directory to prepend to relative paths to images
* @param bool|callable $advanced Whether to use the internal HTML to text converter
* or your own custom converter @return string $message The transformed message Body
* or your own custom converter
* @return string The transformed message body
*
* @throws Exception
*
@@ -4037,7 +4077,8 @@ class PHPMailer
);
continue;
}
if (// Only process relative URLs if a basedir is provided (i.e. no absolute local paths)
if (
// Only process relative URLs if a basedir is provided (i.e. no absolute local paths)
!empty($basedir)
// Ignore URLs containing parent dir traversal (..)
&& (strpos($url, '..') === false)
@@ -4059,13 +4100,14 @@ class PHPMailer
if (strlen($directory) > 1 && '/' !== substr($directory, -1)) {
$directory .= '/';
}
if ($this->addEmbeddedImage(
$basedir . $directory . $filename,
$cid,
$filename,
static::ENCODING_BASE64,
static::_mime_types((string) static::mb_pathinfo($filename, PATHINFO_EXTENSION))
)
if (
$this->addEmbeddedImage(
$basedir . $directory . $filename,
$cid,
$filename,
static::ENCODING_BASE64,
static::_mime_types((string) static::mb_pathinfo($filename, PATHINFO_EXTENSION))
)
) {
$message = preg_replace(
'/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui',
@@ -4114,7 +4156,7 @@ class PHPMailer
public function html2text($html, $advanced = false)
{
if (is_callable($advanced)) {
return $advanced($html);
return call_user_func($advanced, $html);
}
return html_entity_decode(
@@ -4213,6 +4255,7 @@ class PHPMailer
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'webp' => 'image/webp',
'avif' => 'image/avif',
'heif' => 'image/heif',
'heifs' => 'image/heif-sequence',
'heic' => 'image/heic',
@@ -4483,11 +4526,15 @@ class PHPMailer
$privKey = openssl_pkey_get_private($privKeyStr);
}
if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) {
openssl_pkey_free($privKey);
if (PHP_MAJOR_VERSION < 8) {
openssl_pkey_free($privKey);
}
return base64_encode($signature);
}
openssl_pkey_free($privKey);
if (PHP_MAJOR_VERSION < 8) {
openssl_pkey_free($privKey);
}
return '';
}

View File

@@ -1,4 +1,5 @@
<?php
/**
* PHPMailer POP-Before-SMTP Authentication Class.
* PHP Version 5.5.
@@ -9,7 +10,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2019 Marcus Bointon
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
@@ -45,7 +46,7 @@ class POP3
*
* @var string
*/
const VERSION = '6.1.6';
const VERSION = '6.2.0';
/**
* Default POP3 port number.
@@ -62,12 +63,16 @@ class POP3
const DEFAULT_TIMEOUT = 30;
/**
* Debug display level.
* Options: 0 = no, 1+ = yes.
* POP3 class debug output mode.
* Debug output level.
* Options:
* @see POP3::DEBUG_OFF: No output
* @see POP3::DEBUG_SERVER: Server messages, connection/server errors
* @see POP3::DEBUG_CLIENT: Client and Server messages, connection/server errors
*
* @var int
*/
public $do_debug = 0;
public $do_debug = self::DEBUG_OFF;
/**
* POP3 mail server hostname.
@@ -130,6 +135,28 @@ class POP3
*/
const LE = "\r\n";
/**
* Debug level for no output.
*
* @var int
*/
const DEBUG_OFF = 0;
/**
* Debug level to show server -> client messages
* also shows clients connection errors or errors from server
*
* @var int
*/
const DEBUG_SERVER = 1;
/**
* Debug level to show client -> server and server -> client messages.
*
* @var int
*/
const DEBUG_CLIENT = 2;
/**
* Simple static wrapper for all-in-one POP before SMTP.
*
@@ -329,7 +356,7 @@ class POP3
protected function getResponse($size = 128)
{
$response = fgets($this->pop_conn, $size);
if ($this->do_debug >= 1) {
if ($this->do_debug >= self::DEBUG_SERVER) {
echo 'Server -> Client: ', $response;
}
@@ -346,7 +373,7 @@ class POP3
protected function sendString($string)
{
if ($this->pop_conn) {
if ($this->do_debug >= 2) { //Show client messages when debug >= 2
if ($this->do_debug >= self::DEBUG_CLIENT) { //Show client messages when debug >= 2
echo 'Client -> Server: ', $string;
}
@@ -384,7 +411,7 @@ class POP3
protected function setError($error)
{
$this->errors[] = $error;
if ($this->do_debug >= 1) {
if ($this->do_debug >= self::DEBUG_SERVER) {
echo '<pre>';
foreach ($this->errors as $e) {
print_r($e);

View File

@@ -1,4 +1,5 @@
<?php
/**
* PHPMailer RFC821 SMTP email transport class.
* PHP Version 5.5.
@@ -9,7 +10,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2019 Marcus Bointon
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
@@ -34,7 +35,7 @@ class SMTP
*
* @var string
*/
const VERSION = '6.1.6';
const VERSION = '6.2.0';
/**
* SMTP line break constant.
@@ -311,12 +312,6 @@ class SMTP
*/
public function connect($host, $port = null, $timeout = 30, $options = [])
{
static $streamok;
//This is enabled by default since 5.0.0 but some providers disable it
//Check this once and cache the result
if (null === $streamok) {
$streamok = function_exists('stream_socket_client');
}
// Clear errors to avoid confusion
$this->setError('');
// Make sure we are __not__ connected
@@ -335,12 +330,48 @@ class SMTP
(count($options) > 0 ? var_export($options, true) : 'array()'),
self::DEBUG_CONNECTION
);
$this->smtp_conn = $this->getSMTPConnection($host, $port, $timeout, $options);
if ($this->smtp_conn === false) {
//Error info already set inside `getSMTPConnection()`
return false;
}
$this->edebug('Connection: opened', self::DEBUG_CONNECTION);
// Get any announcement
$this->last_reply = $this->get_lines();
$this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER);
return true;
}
/**
* Create connection to the SMTP server.
*
* @param string $host SMTP server IP or host name
* @param int $port The port number to connect to
* @param int $timeout How long to wait for the connection to open
* @param array $options An array of options for stream_context_create()
*
* @return false|resource
*/
protected function getSMTPConnection($host, $port = null, $timeout = 30, $options = [])
{
static $streamok;
//This is enabled by default since 5.0.0 but some providers disable it
//Check this once and cache the result
if (null === $streamok) {
$streamok = function_exists('stream_socket_client');
}
$errno = 0;
$errstr = '';
if ($streamok) {
$socket_context = stream_context_create($options);
set_error_handler([$this, 'errorHandler']);
$this->smtp_conn = stream_socket_client(
$connection = stream_socket_client(
$host . ':' . $port,
$errno,
$errstr,
@@ -356,7 +387,7 @@ class SMTP
self::DEBUG_CONNECTION
);
set_error_handler([$this, 'errorHandler']);
$this->smtp_conn = fsockopen(
$connection = fsockopen(
$host,
$port,
$errno,
@@ -365,8 +396,9 @@ class SMTP
);
restore_error_handler();
}
// Verify we connected properly
if (!is_resource($this->smtp_conn)) {
if (!is_resource($connection)) {
$this->setError(
'Failed to connect to server',
'',
@@ -381,22 +413,19 @@ class SMTP
return false;
}
$this->edebug('Connection: opened', self::DEBUG_CONNECTION);
// SMTP server can take longer to respond, give longer timeout for first read
// Windows does not have support for this timeout function
if (strpos(PHP_OS, 'WIN') !== 0) {
$max = (int) ini_get('max_execution_time');
// Don't bother if unlimited
if (0 !== $max && $timeout > $max) {
$max = (int)ini_get('max_execution_time');
// Don't bother if unlimited, or if set_time_limit is disabled
if (0 !== $max && $timeout > $max && strpos(ini_get('disable_functions'), 'set_time_limit') === false) {
@set_time_limit($timeout);
}
stream_set_timeout($this->smtp_conn, $timeout, 0);
stream_set_timeout($connection, $timeout, 0);
}
// Get any announcement
$announce = $this->get_lines();
$this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER);
return true;
return $connection;
}
/**
@@ -511,11 +540,12 @@ class SMTP
return false;
}
// Send encoded username and password
if (!$this->sendCommand(
'User & Password',
base64_encode("\0" . $username . "\0" . $password),
235
)
if (
!$this->sendCommand(
'User & Password',
base64_encode("\0" . $username . "\0" . $password),
235
)
) {
return false;
}
@@ -1058,8 +1088,10 @@ class SMTP
{
//If SMTP transcripts are left enabled, or debug output is posted online
//it can leak credentials, so hide credentials in all but lowest level
if (self::DEBUG_LOWLEVEL > $this->do_debug &&
in_array($command, ['User & Password', 'Username', 'Password'], true)) {
if (
self::DEBUG_LOWLEVEL > $this->do_debug &&
in_array($command, ['User & Password', 'Username', 'Password'], true)
) {
$this->edebug('CLIENT -> SERVER: [credentials hidden]', self::DEBUG_CLIENT);
} else {
$this->edebug('CLIENT -> SERVER: ' . $data, self::DEBUG_CLIENT);
@@ -1166,13 +1198,41 @@ class SMTP
$selW = null;
while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) {
//Must pass vars in here as params are by reference
if (!stream_select($selR, $selW, $selW, $this->Timelimit)) {
//solution for signals inspired by https://github.com/symfony/symfony/pull/6540
set_error_handler([$this, 'errorHandler']);
$n = stream_select($selR, $selW, $selW, $this->Timelimit);
restore_error_handler();
if ($n === false) {
$message = $this->getError()['detail'];
$this->edebug(
'SMTP -> get_lines(): select failed (' . $message . ')',
self::DEBUG_LOWLEVEL
);
//stream_select returns false when the `select` system call is interrupted
//by an incoming signal, try the select again
if (stripos($message, 'interrupted system call') !== false) {
$this->edebug(
'SMTP -> get_lines(): retrying stream_select',
self::DEBUG_LOWLEVEL
);
$this->setError('');
continue;
}
break;
}
if (!$n) {
$this->edebug(
'SMTP -> get_lines(): select timed-out in (' . $this->Timelimit . ' sec)',
self::DEBUG_LOWLEVEL
);
break;
}
//Deliberate noise suppression - errors are handled afterwards
$str = @fgets($this->smtp_conn, self::MAX_REPLY_LENGTH);
$this->edebug('SMTP INBOUND: "' . trim($str) . '"', self::DEBUG_LOWLEVEL);

View File

@@ -115,10 +115,8 @@ final class Mbstring
return iconv($fromEncoding, $toEncoding.'//IGNORE', $s);
}
public static function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null)
public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars)
{
$vars = array(&$a, &$b, &$c, &$d, &$e, &$f);
$ok = true;
array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) {
if (false === $v = Mbstring::mb_convert_encoding($v, $toEncoding, $fromEncoding)) {
@@ -629,10 +627,11 @@ final class Mbstring
{
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
return strrchr($haystack, $needle, $part);
$pos = strrpos($haystack, $needle);
} else {
$needle = self::mb_substr($needle, 0, 1, $encoding);
$pos = iconv_strrpos($haystack, $needle, $encoding);
}
$needle = self::mb_substr($needle, 0, 1, $encoding);
$pos = iconv_strrpos($haystack, $needle, $encoding);
return self::getSubpart($pos, $part, $haystack, $encoding);
}

View File

@@ -12,28 +12,28 @@
use Symfony\Polyfill\Mbstring as p;
if (!function_exists('mb_convert_encoding')) {
function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); }
function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); }
}
if (!function_exists('mb_decode_mimeheader')) {
function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); }
function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); }
}
if (!function_exists('mb_encode_mimeheader')) {
function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); }
function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); }
}
if (!function_exists('mb_decode_numericentity')) {
function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); }
function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); }
}
if (!function_exists('mb_encode_numericentity')) {
function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); }
function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); }
}
if (!function_exists('mb_convert_case')) {
function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); }
function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); }
}
if (!function_exists('mb_internal_encoding')) {
function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); }
function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); }
}
if (!function_exists('mb_language')) {
function mb_language($lang = null) { return p\Mbstring::mb_language($lang); }
function mb_language($language = null) { return p\Mbstring::mb_language($language); }
}
if (!function_exists('mb_list_encodings')) {
function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
@@ -42,88 +42,94 @@ if (!function_exists('mb_encoding_aliases')) {
function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
}
if (!function_exists('mb_check_encoding')) {
function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); }
function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); }
}
if (!function_exists('mb_detect_encoding')) {
function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); }
function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); }
}
if (!function_exists('mb_detect_order')) {
function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); }
function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); }
}
if (!function_exists('mb_parse_str')) {
function mb_parse_str($s, &$result = array()) { parse_str($s, $result); }
function mb_parse_str($string, &$result = array()) { parse_str($string, $result); }
}
if (!function_exists('mb_strlen')) {
function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); }
function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); }
}
if (!function_exists('mb_strpos')) {
function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); }
function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_strtolower')) {
function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); }
function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); }
}
if (!function_exists('mb_strtoupper')) {
function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); }
function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); }
}
if (!function_exists('mb_substitute_character')) {
function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); }
function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); }
}
if (!function_exists('mb_substr')) {
function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); }
function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); }
}
if (!function_exists('mb_stripos')) {
function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); }
function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_stristr')) {
function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); }
function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_strrchr')) {
function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); }
function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_strrichr')) {
function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); }
function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_strripos')) {
function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); }
function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_strrpos')) {
function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); }
function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_strstr')) {
function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); }
function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_get_info')) {
function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
}
if (!function_exists('mb_http_output')) {
function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); }
function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); }
}
if (!function_exists('mb_strwidth')) {
function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); }
function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); }
}
if (!function_exists('mb_substr_count')) {
function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); }
function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); }
}
if (!function_exists('mb_output_handler')) {
function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); }
function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); }
}
if (!function_exists('mb_http_input')) {
function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); }
}
if (!function_exists('mb_convert_variables')) {
function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); }
if (PHP_VERSION_ID >= 80000) {
function mb_convert_variables($to_encoding, $from_encoding, &$var, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, $var, ...$vars); }
} else {
function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); }
}
}
if (!function_exists('mb_ord')) {
function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); }
function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); }
}
if (!function_exists('mb_chr')) {
function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); }
function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); }
}
if (!function_exists('mb_scrub')) {
function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); }
}
if (!function_exists('mb_str_split')) {
function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); }
function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); }
}
if (extension_loaded('mbstring')) {