diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-11-13 15:26:23 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-11-13 15:26:23 +0000 |
| commit | 6ddab597f679060f73c189b092529f59d59f8eb0 (patch) | |
| tree | 2d6d01d08d1f39e76ac2938e3ed7ced9aea2fc7c /vendor/symfony/http-foundation | |
| parent | cf6ece77e5c310b96aff1de5a9d01d8c5ddda5c2 (diff) | |
| download | webtrees-6ddab597f679060f73c189b092529f59d59f8eb0.tar.gz webtrees-6ddab597f679060f73c189b092529f59d59f8eb0.tar.bz2 webtrees-6ddab597f679060f73c189b092529f59d59f8eb0.zip | |
Update vendor dependencies
Diffstat (limited to 'vendor/symfony/http-foundation')
4 files changed, 16 insertions, 5 deletions
diff --git a/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php b/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php index 7a6da17dc0..5d3ae10644 100644 --- a/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php @@ -36,7 +36,7 @@ class FileBinaryMimeTypeGuesser implements MimeTypeGuesserInterface * * @param string $cmd The command to run to get the mime type of a file */ - public function __construct(string $cmd = 'file -b --mime %s 2>/dev/null') + public function __construct(string $cmd = 'file -b --mime -- %s 2>/dev/null') { $this->cmd = $cmd; } @@ -85,7 +85,7 @@ class FileBinaryMimeTypeGuesser implements MimeTypeGuesserInterface ob_start(); // need to use --mime instead of -i. see #6641 - passthru(sprintf($this->cmd, escapeshellarg($path)), $return); + passthru(sprintf($this->cmd, escapeshellarg((0 === strpos($path, '-') ? './' : '').$path)), $return); if ($return > 0) { ob_end_clean(); diff --git a/vendor/symfony/http-foundation/Tests/File/Fixtures/-test b/vendor/symfony/http-foundation/Tests/File/Fixtures/-test Binary files differnew file mode 100644 index 0000000000..b636f4b8df --- /dev/null +++ b/vendor/symfony/http-foundation/Tests/File/Fixtures/-test diff --git a/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php b/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php index a43ce819fb..c566db7693 100644 --- a/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php +++ b/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php @@ -21,6 +21,17 @@ use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; */ class MimeTypeTest extends TestCase { + public function testGuessWithLeadingDash() + { + $cwd = getcwd(); + chdir(__DIR__.'/../Fixtures'); + try { + $this->assertEquals('image/gif', MimeTypeGuesser::getInstance()->guess('-test')); + } finally { + chdir($cwd); + } + } + public function testGuessImageWithoutExtension() { $this->assertEquals('image/gif', MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/test')); diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/MockFileSessionStorageTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/MockFileSessionStorageTest.php index d9314075af..8e2051f7eb 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/MockFileSessionStorageTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/MockFileSessionStorageTest.php @@ -41,12 +41,12 @@ class MockFileSessionStorageTest extends TestCase protected function tearDown(): void { - $this->sessionDir = null; - $this->storage = null; - array_map('unlink', glob($this->sessionDir.'/*.session')); + array_map('unlink', glob($this->sessionDir.'/*')); if (is_dir($this->sessionDir)) { rmdir($this->sessionDir); } + $this->sessionDir = null; + $this->storage = null; } public function testStart() |
