更新vendor

This commit is contained in:
liyukun 2022-06-01 10:34:28 +08:00
parent c6f0e8b484
commit d84a1be9b9
23 changed files with 317 additions and 72 deletions

1
.gitignore vendored
View File

@ -5,5 +5,6 @@
/.env /.env
/runtime /runtime
/composer.lock /composer.lock
/public/upload/image
/public/install/install.lock /public/install/install.lock
/.constant /.constant

View File

@ -7,11 +7,11 @@ $baseDir = dirname($vendorDir);
return array( return array(
'9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php', '9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php',
'35fab96057f1bf5e7aba31a8a6d5fdde' => $vendorDir . '/topthink/think-orm/stubs/load_stubs.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'35fab96057f1bf5e7aba31a8a6d5fdde' => $vendorDir . '/topthink/think-orm/stubs/load_stubs.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
); );

View File

@ -8,13 +8,13 @@ class ComposerStaticInit4b57298e8d0e895486f3307a354a7e1a
{ {
public static $files = array ( public static $files = array (
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
'35fab96057f1bf5e7aba31a8a6d5fdde' => __DIR__ . '/..' . '/topthink/think-orm/stubs/load_stubs.php',
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'35fab96057f1bf5e7aba31a8a6d5fdde' => __DIR__ . '/..' . '/topthink/think-orm/stubs/load_stubs.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
); );
public static $prefixLengthsPsr4 = array ( public static $prefixLengthsPsr4 = array (

View File

@ -331,17 +331,17 @@
}, },
{ {
"name": "league/mime-type-detection", "name": "league/mime-type-detection",
"version": "1.9.0", "version": "1.11.0",
"version_normalized": "1.9.0.0", "version_normalized": "1.11.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/mime-type-detection.git", "url": "https://github.com/thephpleague/mime-type-detection.git",
"reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69" "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/aa70e813a6ad3d1558fc927863d47309b4c23e69", "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
"reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69", "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -359,7 +359,7 @@
"phpstan/phpstan": "^0.12.68", "phpstan/phpstan": "^0.12.68",
"phpunit/phpunit": "^8.5.8 || ^9.3" "phpunit/phpunit": "^8.5.8 || ^9.3"
}, },
"time": "2021-11-21T11:48:40+00:00", "time": "2022-04-17T13:12:02+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@ -380,7 +380,7 @@
"description": "Mime-type detection for Flysystem", "description": "Mime-type detection for Flysystem",
"support": { "support": {
"issues": "https://github.com/thephpleague/mime-type-detection/issues", "issues": "https://github.com/thephpleague/mime-type-detection/issues",
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.9.0" "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0"
}, },
"funding": [ "funding": [
{ {
@ -914,17 +914,17 @@
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v5.4.6", "version": "v5.4.9",
"version_normalized": "5.4.6.0", "version_normalized": "5.4.9.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "34e89bc147633c0f9dd6caaaf56da3b806a21465" "reference": "6b0d0e4aca38d57605dcd11e2416994b38774522"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/34e89bc147633c0f9dd6caaaf56da3b806a21465", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6b0d0e4aca38d57605dcd11e2416994b38774522",
"reference": "34e89bc147633c0f9dd6caaaf56da3b806a21465", "reference": "6b0d0e4aca38d57605dcd11e2416994b38774522",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -948,7 +948,7 @@
"suggest": { "suggest": {
"symfony/mime": "To use the file extension guesser" "symfony/mime": "To use the file extension guesser"
}, },
"time": "2022-03-05T21:03:43+00:00", "time": "2022-05-17T15:07:29+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@ -976,7 +976,7 @@
"description": "Defines an object-oriented layer for the HTTP specification", "description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/http-foundation/tree/v5.4.6" "source": "https://github.com/symfony/http-foundation/tree/v5.4.9"
}, },
"funding": [ "funding": [
{ {
@ -1265,17 +1265,17 @@
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v4.4.39", "version": "v4.4.42",
"version_normalized": "4.4.39.0", "version_normalized": "4.4.42.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "35237c5e5dcb6593a46a860ba5b29c1d4683d80e" "reference": "742aab50ad097bcb62d91fccb613f66b8047d2ca"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/35237c5e5dcb6593a46a860ba5b29c1d4683d80e", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/742aab50ad097bcb62d91fccb613f66b8047d2ca",
"reference": "35237c5e5dcb6593a46a860ba5b29c1d4683d80e", "reference": "742aab50ad097bcb62d91fccb613f66b8047d2ca",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -1305,7 +1305,7 @@
"ext-intl": "To show region name in time zone dump", "ext-intl": "To show region name in time zone dump",
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
}, },
"time": "2022-02-25T10:38:15+00:00", "time": "2022-05-21T10:00:54+00:00",
"bin": [ "bin": [
"Resources/bin/var-dump-server" "Resources/bin/var-dump-server"
], ],
@ -1343,7 +1343,7 @@
"dump" "dump"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-dumper/tree/v4.4.39" "source": "https://github.com/symfony/var-dumper/tree/v4.4.42"
}, },
"funding": [ "funding": [
{ {
@ -1439,17 +1439,17 @@
}, },
{ {
"name": "topthink/think-captcha", "name": "topthink/think-captcha",
"version": "v3.0.4", "version": "v3.0.7",
"version_normalized": "3.0.4.0", "version_normalized": "3.0.7.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/top-think/think-captcha.git", "url": "https://github.com/top-think/think-captcha.git",
"reference": "db5be361d3cd664d236fb95d5dffe93a117283ad" "reference": "a450602932a5d9ba183e288b79921ba3b9a92331"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/top-think/think-captcha/zipball/db5be361d3cd664d236fb95d5dffe93a117283ad", "url": "https://api.github.com/repos/top-think/think-captcha/zipball/a450602932a5d9ba183e288b79921ba3b9a92331",
"reference": "db5be361d3cd664d236fb95d5dffe93a117283ad", "reference": "a450602932a5d9ba183e288b79921ba3b9a92331",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -1461,7 +1461,7 @@
"require": { "require": {
"topthink/framework": "^6.0.0" "topthink/framework": "^6.0.0"
}, },
"time": "2022-01-07T06:34:19+00:00", "time": "2022-04-23T02:38:14+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"think": { "think": {
@ -1475,12 +1475,12 @@
}, },
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
"psr-4": {
"think\\captcha\\": "src/"
},
"files": [ "files": [
"src/helper.php" "src/helper.php"
] ],
"psr-4": {
"think\\captcha\\": "src/"
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@ -1495,7 +1495,7 @@
"description": "captcha package for thinkphp", "description": "captcha package for thinkphp",
"support": { "support": {
"issues": "https://github.com/top-think/think-captcha/issues", "issues": "https://github.com/top-think/think-captcha/issues",
"source": "https://github.com/top-think/think-captcha/tree/v3.0.4" "source": "https://github.com/top-think/think-captcha/tree/v3.0.7"
}, },
"install-path": "../topthink/think-captcha" "install-path": "../topthink/think-captcha"
}, },

View File

@ -5,7 +5,7 @@
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => '552e012903de8b70be55b883177f22e29794b3be', 'reference' => 'c6f0e8b484140c10d99913401cd5f1fc7a51297e',
'name' => 'topthink/think', 'name' => 'topthink/think',
'dev' => true, 'dev' => true,
), ),
@ -47,12 +47,12 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'league/mime-type-detection' => array( 'league/mime-type-detection' => array(
'pretty_version' => '1.9.0', 'pretty_version' => '1.11.0',
'version' => '1.9.0.0', 'version' => '1.11.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../league/mime-type-detection', 'install_path' => __DIR__ . '/../league/mime-type-detection',
'aliases' => array(), 'aliases' => array(),
'reference' => 'aa70e813a6ad3d1558fc927863d47309b4c23e69', 'reference' => 'ff6248ea87a9f116e78edd6002e39e5128a0d4dd',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'phpmailer/phpmailer' => array( 'phpmailer/phpmailer' => array(
@ -128,12 +128,12 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/http-foundation' => array( 'symfony/http-foundation' => array(
'pretty_version' => 'v5.4.6', 'pretty_version' => 'v5.4.9',
'version' => '5.4.6.0', 'version' => '5.4.9.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-foundation', 'install_path' => __DIR__ . '/../symfony/http-foundation',
'aliases' => array(), 'aliases' => array(),
'reference' => '34e89bc147633c0f9dd6caaaf56da3b806a21465', 'reference' => '6b0d0e4aca38d57605dcd11e2416994b38774522',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/polyfill-mbstring' => array( 'symfony/polyfill-mbstring' => array(
@ -164,12 +164,12 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/var-dumper' => array( 'symfony/var-dumper' => array(
'pretty_version' => 'v4.4.39', 'pretty_version' => 'v4.4.42',
'version' => '4.4.39.0', 'version' => '4.4.42.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/var-dumper', 'install_path' => __DIR__ . '/../symfony/var-dumper',
'aliases' => array(), 'aliases' => array(),
'reference' => '35237c5e5dcb6593a46a860ba5b29c1d4683d80e', 'reference' => '742aab50ad097bcb62d91fccb613f66b8047d2ca',
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'topthink/framework' => array( 'topthink/framework' => array(
@ -187,16 +187,16 @@
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => '552e012903de8b70be55b883177f22e29794b3be', 'reference' => 'c6f0e8b484140c10d99913401cd5f1fc7a51297e',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'topthink/think-captcha' => array( 'topthink/think-captcha' => array(
'pretty_version' => 'v3.0.4', 'pretty_version' => 'v3.0.7',
'version' => '3.0.4.0', 'version' => '3.0.7.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../topthink/think-captcha', 'install_path' => __DIR__ . '/../topthink/think-captcha',
'aliases' => array(), 'aliases' => array(),
'reference' => 'db5be361d3cd664d236fb95d5dffe93a117283ad', 'reference' => 'a450602932a5d9ba183e288b79921ba3b9a92331',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'topthink/think-helper' => array( 'topthink/think-helper' => array(

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

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

View File

@ -1,12 +1,18 @@
# Changelog # Changelog
## 1.10.0 - 2022-04-11
### Fixed
- Added Flysystem v1 inconclusive mime-types and made it configurable as a constructor parameter.
## 1.9.0 - 2021-11-21 ## 1.9.0 - 2021-11-21
### Updated ### Updated
- Updated lookup - Updated lookup
- ## 1.8.0 - 2021-09-25 ## 1.8.0 - 2021-09-25
### Added ### Added

View File

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

View File

@ -11,7 +11,13 @@ use finfo;
class FinfoMimeTypeDetector implements MimeTypeDetector class FinfoMimeTypeDetector implements MimeTypeDetector
{ {
private const INCONCLUSIVE_MIME_TYPES = ['application/x-empty', 'text/plain', 'text/x-asm']; private const INCONCLUSIVE_MIME_TYPES = [
'application/x-empty',
'text/plain',
'text/x-asm',
'application/octet-stream',
'inode/x-empty',
];
/** /**
* @var finfo * @var finfo
@ -28,14 +34,21 @@ class FinfoMimeTypeDetector implements MimeTypeDetector
*/ */
private $bufferSampleSize; private $bufferSampleSize;
/**
* @var array<string>
*/
private $inconclusiveMimetypes;
public function __construct( public function __construct(
string $magicFile = '', string $magicFile = '',
ExtensionToMimeTypeMap $extensionMap = null, ExtensionToMimeTypeMap $extensionMap = null,
?int $bufferSampleSize = null ?int $bufferSampleSize = null,
array $inconclusiveMimetypes = self::INCONCLUSIVE_MIME_TYPES
) { ) {
$this->finfo = new finfo(FILEINFO_MIME_TYPE, $magicFile); $this->finfo = new finfo(FILEINFO_MIME_TYPE, $magicFile);
$this->extensionMap = $extensionMap ?: new GeneratedExtensionToMimeTypeMap(); $this->extensionMap = $extensionMap ?: new GeneratedExtensionToMimeTypeMap();
$this->bufferSampleSize = $bufferSampleSize; $this->bufferSampleSize = $bufferSampleSize;
$this->inconclusiveMimetypes = $inconclusiveMimetypes;
} }
public function detectMimeType(string $path, $contents): ?string public function detectMimeType(string $path, $contents): ?string
@ -44,7 +57,7 @@ class FinfoMimeTypeDetector implements MimeTypeDetector
? (@$this->finfo->buffer($this->takeSample($contents)) ?: null) ? (@$this->finfo->buffer($this->takeSample($contents)) ?: null)
: null; : null;
if ($mimeType !== null && ! in_array($mimeType, self::INCONCLUSIVE_MIME_TYPES)) { if ($mimeType !== null && ! in_array($mimeType, $this->inconclusiveMimetypes)) {
return $mimeType; return $mimeType;
} }

View File

@ -66,6 +66,8 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
'atomsvc' => 'application/atomsvc+xml', 'atomsvc' => 'application/atomsvc+xml',
'atx' => 'application/vnd.antix.game-component', 'atx' => 'application/vnd.antix.game-component',
'au' => 'audio/x-au', 'au' => 'audio/x-au',
'avci' => 'image/avci',
'avcs' => 'image/avcs',
'avi' => 'video/x-msvideo', 'avi' => 'video/x-msvideo',
'avif' => 'image/avif', 'avif' => 'image/avif',
'aw' => 'application/applixware', 'aw' => 'application/applixware',
@ -160,6 +162,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
'com' => 'application/x-msdownload', 'com' => 'application/x-msdownload',
'conf' => 'text/plain', 'conf' => 'text/plain',
'cpio' => 'application/x-cpio', 'cpio' => 'application/x-cpio',
'cpl' => 'application/cpl+xml',
'cpp' => 'text/x-c', 'cpp' => 'text/x-c',
'cpt' => 'application/mac-compactpro', 'cpt' => 'application/mac-compactpro',
'crd' => 'application/x-mscardfile', 'crd' => 'application/x-mscardfile',
@ -583,6 +586,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
'mpd' => 'application/dash+xml', 'mpd' => 'application/dash+xml',
'mpe' => 'video/mpeg', 'mpe' => 'video/mpeg',
'mpeg' => 'video/mpeg', 'mpeg' => 'video/mpeg',
'mpf' => 'application/media-policy-dataset+xml',
'mpg' => 'video/mpeg', 'mpg' => 'video/mpeg',
'mpg4' => 'video/mp4', 'mpg4' => 'video/mp4',
'mpga' => 'audio/mpeg', 'mpga' => 'audio/mpeg',
@ -726,6 +730,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
'pgm' => 'image/x-portable-graymap', 'pgm' => 'image/x-portable-graymap',
'pgn' => 'application/x-chess-pgn', 'pgn' => 'application/x-chess-pgn',
'pgp' => 'application/pgp', 'pgp' => 'application/pgp',
'phar' => 'application/octet-stream',
'php' => 'application/x-httpd-php', 'php' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php', 'php3' => 'application/x-httpd-php',
'php4' => 'application/x-httpd-php', 'php4' => 'application/x-httpd-php',
@ -760,7 +765,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'pqa' => 'application/vnd.palm', 'pqa' => 'application/vnd.palm',
'prc' => 'application/x-pilot', 'prc' => 'model/prc',
'pre' => 'application/vnd.lotus-freelance', 'pre' => 'application/vnd.lotus-freelance',
'prf' => 'application/pics-rules', 'prf' => 'application/pics-rules',
'provx' => 'application/provenance+xml', 'provx' => 'application/provenance+xml',
@ -1000,6 +1005,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
'txd' => 'application/vnd.genomatix.tuxedo', 'txd' => 'application/vnd.genomatix.tuxedo',
'txf' => 'application/vnd.mobius.txf', 'txf' => 'application/vnd.mobius.txf',
'txt' => 'text/plain', 'txt' => 'text/plain',
'u3d' => 'model/u3d',
'u8dsn' => 'message/global-delivery-status', 'u8dsn' => 'message/global-delivery-status',
'u8hdr' => 'message/global-headers', 'u8hdr' => 'message/global-headers',
'u8mdn' => 'message/global-disposition-notification', 'u8mdn' => 'message/global-disposition-notification',
@ -1096,6 +1102,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
'webp' => 'image/webp', 'webp' => 'image/webp',
'wg' => 'application/vnd.pmi.widget', 'wg' => 'application/vnd.pmi.widget',
'wgt' => 'application/widget', 'wgt' => 'application/widget',
'wif' => 'application/watcherinfo+xml',
'wks' => 'application/vnd.ms-works', 'wks' => 'application/vnd.ms-works',
'wm' => 'video/x-ms-wm', 'wm' => 'video/x-ms-wm',
'wma' => 'audio/x-ms-wma', 'wma' => 'audio/x-ms-wma',

View File

@ -0,0 +1,44 @@
<?php
/**
* PHPMailer - PHP email creation and transport class.
* PHP Version 5.5.
*
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
*
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @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
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*/
namespace PHPMailer\PHPMailer;
/**
* OAuthTokenProvider - OAuth2 token provider interface.
* Provides base64 encoded OAuth2 auth strings for SMTP authentication.
*
* @see OAuth
* @see SMTP::authenticate()
*
* @author Peter Scopes (pdscopes)
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
*/
interface OAuthTokenProvider
{
/**
* Generate a base64-encoded OAuth token ensuring that the access token has not expired.
* The string to be base 64 encoded should be in the form:
* "user=<user_email_address>\001auth=Bearer <access_token>\001\001"
*
* @return string
*/
public function getOauth64();
}

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php <?php
// This file is automatically generated at:2022-04-11 20:00:05 // This file is automatically generated at:2022-06-01 10:33:01
declare (strict_types = 1); declare (strict_types = 1);
return array ( return array (
0 => 'think\\captcha\\CaptchaService', 0 => 'think\\captcha\\CaptchaService',

View File

@ -145,6 +145,12 @@ class NativeSessionStorage implements SessionStorageInterface
throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line)); throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line));
} }
$sessionId = $_COOKIE[session_name()] ?? null;
if ($sessionId && !preg_match('/^[a-zA-Z0-9,-]{22,}$/', $sessionId)) {
// the session ID in the header is invalid, create a new one
session_id(session_create_id());
}
// ok to try and start the session // ok to try and start the session
if (!session_start()) { if (!session_start()) {
throw new \RuntimeException('Failed to start the session.'); throw new \RuntimeException('Failed to start the session.');

View File

@ -0,0 +1,103 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Polyfill\Php80;
/**
* @author Fedonyuk Anton <info@ensostudio.ru>
*
* @internal
*/
class PhpToken implements \Stringable
{
/**
* @var int
*/
public $id;
/**
* @var string
*/
public $text;
/**
* @var int
*/
public $line;
/**
* @var int
*/
public $pos;
public function __construct(int $id, string $text, int $line = -1, int $position = -1)
{
$this->id = $id;
$this->text = $text;
$this->line = $line;
$this->pos = $position;
}
public function getTokenName(): ?string
{
if ('UNKNOWN' === $name = token_name($this->id)) {
$name = \strlen($this->text) > 1 || \ord($this->text) < 32 ? null : $this->text;
}
return $name;
}
/**
* @param int|string|array $kind
*/
public function is($kind): bool
{
foreach ((array) $kind as $value) {
if (\in_array($value, [$this->id, $this->text], true)) {
return true;
}
}
return false;
}
public function isIgnorable(): bool
{
return \in_array($this->id, [\T_WHITESPACE, \T_COMMENT, \T_DOC_COMMENT, \T_OPEN_TAG], true);
}
public function __toString(): string
{
return (string) $this->text;
}
/**
* @return static[]
*/
public static function tokenize(string $code, int $flags = 0): array
{
$line = 1;
$position = 0;
$tokens = token_get_all($code, $flags);
foreach ($tokens as $index => $token) {
if (\is_string($token)) {
$id = \ord($token);
$text = $token;
} else {
[$id, $text, $line] = $token;
}
$tokens[$index] = new static($id, $text, $line, $position);
$position += \strlen($text);
}
return $tokens;
}
}

View File

@ -0,0 +1,7 @@
<?php
if (\PHP_VERSION_ID < 80000 && \extension_loaded('tokenizer')) {
class PhpToken extends Symfony\Polyfill\Php80\PhpToken
{
}
}

View File

@ -105,11 +105,11 @@ class DateCaster
} }
$period = sprintf( $period = sprintf(
'every %s, from %s (%s) %s', 'every %s, from %s%s %s',
self::formatInterval($p->getDateInterval()), self::formatInterval($p->getDateInterval()),
$p->include_start_date ? '[' : ']',
self::formatDateTime($p->getStartDate()), self::formatDateTime($p->getStartDate()),
$p->include_start_date ? 'included' : 'excluded', ($end = $p->getEndDate()) ? 'to '.self::formatDateTime($end).(\PHP_VERSION_ID >= 80200 && $p->include_end_date ? ']' : '[') : 'recurring '.$p->recurrences.' time/s'
($end = $p->getEndDate()) ? 'to '.self::formatDateTime($end) : 'recurring '.$p->recurrences.' time/s'
); );
$p = [Caster::PREFIX_VIRTUAL.'period' => new ConstStub($period, implode("\n", $dates))]; $p = [Caster::PREFIX_VIRTUAL.'period' => new ConstStub($period, implode("\n", $dates))];

View File

@ -0,0 +1,33 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* @author Nicolas Grekas <p@tchwork.com>
*
* @internal
*/
final class MysqliCaster
{
public static function castMysqliDriver(\mysqli_driver $c, array $a, Stub $stub, bool $isNested): array
{
foreach ($a as $k => $v) {
if (isset($c->$k)) {
$a[$k] = $c->$k;
}
}
return $a;
}
}

View File

@ -1,4 +1,5 @@
<?php <?php
/* /*
* This file is part of the Symfony package. * This file is part of the Symfony package.
* *

View File

@ -46,8 +46,7 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
{ {
$this->flags = $flags; $this->flags = $flags;
$this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'); $this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8');
$this->decimalPoint = localeconv(); $this->decimalPoint = \PHP_VERSION_ID >= 80000 ? '.' : localeconv()['decimal_point'];
$this->decimalPoint = $this->decimalPoint['decimal_point'];
$this->setOutput($output ?: static::$defaultOutput); $this->setOutput($output ?: static::$defaultOutput);
if (!$output && \is_string(static::$defaultOutput)) { if (!$output && \is_string(static::$defaultOutput)) {
static::$defaultOutput = $this->outputStream; static::$defaultOutput = $this->outputStream;
@ -122,8 +121,7 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
*/ */
public function dump(Data $data, $output = null) public function dump(Data $data, $output = null)
{ {
$this->decimalPoint = localeconv(); $this->decimalPoint = \PHP_VERSION_ID >= 80000 ? '.' : localeconv()['decimal_point'];
$this->decimalPoint = $this->decimalPoint['decimal_point'];
if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(\LC_NUMERIC, 0) : null) { if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(\LC_NUMERIC, 0) : null) {
setlocale(\LC_NUMERIC, 'C'); setlocale(\LC_NUMERIC, 'C');

View File

@ -371,7 +371,7 @@ return function (root, x) {
if (/\bsf-dump-toggle\b/.test(a.className)) { if (/\bsf-dump-toggle\b/.test(a.className)) {
e.preventDefault(); e.preventDefault();
if (!toggle(a, isCtrlKey(e))) { if (!toggle(a, isCtrlKey(e))) {
var r = doc.getElementById(a.getAttribute('href').substr(1)), var r = doc.getElementById(a.getAttribute('href').slice(1)),
s = r.previousSibling, s = r.previousSibling,
f = r.parentNode, f = r.parentNode,
t = a.parentNode; t = a.parentNode;
@ -438,7 +438,7 @@ return function (root, x) {
toggle(a); toggle(a);
} }
} else if (/\bsf-dump-ref\b/.test(elt.className) && (a = elt.getAttribute('href'))) { } else if (/\bsf-dump-ref\b/.test(elt.className) && (a = elt.getAttribute('href'))) {
a = a.substr(1); a = a.slice(1);
elt.className += ' '+a; elt.className += ' '+a;
if (/[\[{]$/.test(elt.previousSibling.nodeValue)) { if (/[\[{]$/.test(elt.previousSibling.nodeValue)) {
@ -978,7 +978,7 @@ EOHTML
} }
$this->lastDepth = $depth; $this->lastDepth = $depth;
$this->line = mb_encode_numericentity($this->line, [0x80, 0xFFFF, 0, 0xFFFF], 'UTF-8'); $this->line = mb_encode_numericentity($this->line, [0x80, 0x10FFFF, 0, 0x1FFFFF], 'UTF-8');
if (-1 === $depth) { if (-1 === $depth) {
AbstractDumper::dumpLine(0); AbstractDumper::dumpLine(0);

Binary file not shown.

Binary file not shown.

View File

@ -192,7 +192,7 @@ class Captcha
$dir = dir($ttfPath); $dir = dir($ttfPath);
$ttfs = []; $ttfs = [];
while (false !== ($file = $dir->read())) { while (false !== ($file = $dir->read())) {
if ('.' != $file[0] && substr($file, -4) == '.ttf') { if (substr($file, -4) == '.ttf' || substr($file, -4) == '.otf') {
$ttfs[] = $file; $ttfs[] = $file;
} }
} }
@ -220,11 +220,11 @@ class Captcha
foreach ($text as $index => $char) { foreach ($text as $index => $char) {
$x = $this->fontSize * ($index + 1) * mt_rand(1.2, 1.6) * ($this->math ? 1 : 1.5); $x = $this->fontSize * ($index + 1) * ($this->math ? 1 : 1.5);
$y = $this->fontSize + mt_rand(10, 20); $y = $this->fontSize + mt_rand(10, 20);
$angle = $this->math ? 0 : mt_rand(-40, 40); $angle = $this->math ? 0 : mt_rand(-40, 40);
imagettftext($this->im, $this->fontSize, $angle, $x, $y, $this->color, $fontttf, $char); imagettftext($this->im, $this->fontSize, $angle, (int) $x, (int) $y, $this->color, $fontttf, $char);
} }
ob_start(); ob_start();