Commit 9f5c2e99 authored by catch's avatar catch
Browse files

Issue #3210486 by Spokje, longwave, andypost, alexpott: Remove...

Issue #3210486 by Spokje, longwave, andypost, alexpott: Remove typo3/phar-stream-wrapper and associated code
parent ca3ce56a
Loading
Loading
Loading
Loading
+2 −58
Changes for composer.lock: 2 added lines, 58 removed lines.
Original line number Diff line number Diff line
@@ -448,7 +448,7 @@
            "dist": {
                "type": "path",
                "url": "core",
                "reference": "eefc18dedeaf145e81deed18c914b87cc2c62bd8"
                "reference": "f6e86b91c8d470e57aa22b05e003a389d43a0813"
            },
            "require": {
                "asm89/stack-cors": "^2.0.2",
@@ -489,8 +489,7 @@
                "symfony/serializer": "^5.4",
                "symfony/validator": "^5.4",
                "symfony/yaml": "^5.4",
                "twig/twig": "^3.0",
                "typo3/phar-stream-wrapper": "^3.1.3"
                "twig/twig": "^3.0"
            },
            "conflict": {
                "drush/drush": "<8.1.10"
@@ -4468,61 +4467,6 @@
                }
            ],
            "time": "2022-01-03T21:15:37+00:00"
        },
        {
            "name": "typo3/phar-stream-wrapper",
            "version": "v3.1.7",
            "source": {
                "type": "git",
                "url": "https://github.com/TYPO3/phar-stream-wrapper.git",
                "reference": "5cc2f04a4e2f5c7e9cc02a3bdf80fae0f3e11a8c"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/TYPO3/phar-stream-wrapper/zipball/5cc2f04a4e2f5c7e9cc02a3bdf80fae0f3e11a8c",
                "reference": "5cc2f04a4e2f5c7e9cc02a3bdf80fae0f3e11a8c",
                "shasum": ""
            },
            "require": {
                "ext-json": "*",
                "php": "^7.0 || ^8.0"
            },
            "require-dev": {
                "ext-xdebug": "*",
                "phpspec/prophecy": "^1.10",
                "symfony/phpunit-bridge": "^5.1"
            },
            "suggest": {
                "ext-fileinfo": "For PHP builtin file type guessing, otherwise uses internal processing"
            },
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-master": "v3.x-dev"
                }
            },
            "autoload": {
                "psr-4": {
                    "TYPO3\\PharStreamWrapper\\": "src/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "description": "Interceptors for PHP's native phar:// stream handling",
            "homepage": "https://typo3.org/",
            "keywords": [
                "phar",
                "php",
                "security",
                "stream-wrapper"
            ],
            "support": {
                "issues": "https://github.com/TYPO3/phar-stream-wrapper/issues",
                "source": "https://github.com/TYPO3/phar-stream-wrapper/tree/v3.1.7"
            },
            "time": "2021-09-20T19:19:13+00:00"
        }
    ],
    "packages-dev": [
+1 −2
Changes for composer/Metapackage/CoreRecommended/composer.json: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
@@ -60,7 +60,6 @@
        "symfony/validator": "v5.4.2",
        "symfony/var-dumper": "v5.4.2",
        "symfony/yaml": "v5.4.2",
        "twig/twig": "v3.3.7",
        "typo3/phar-stream-wrapper": "v3.1.7"
        "twig/twig": "v3.3.7"
    }
}
−1
Changes for core/composer.json: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@
        "symfony/polyfill-iconv": "^1.0",
        "symfony/polyfill-php80": "^1.16",
        "symfony/yaml": "^5.4",
        "typo3/phar-stream-wrapper": "^3.1.3",
        "twig/twig": "^3.0",
        "doctrine/annotations": "^1.12",
        "guzzlehttp/guzzle": "^7.3.0",
−25
Changes for core/lib/Drupal/Core/DrupalKernel.php: 0 added lines, 25 removed lines.
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@
use Drupal\Core\Installer\InstallerKernel;
use Drupal\Core\Installer\InstallerRedirectTrait;
use Drupal\Core\Language\Language;
use Drupal\Core\Security\PharExtensionInterceptor;
use Drupal\Core\Security\RequestSanitizer;
use Drupal\Core\Site\Settings;
use Drupal\Core\Test\TestDatabase;
@@ -33,9 +32,6 @@
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
use Symfony\Component\HttpKernel\TerminableInterface;
use TYPO3\PharStreamWrapper\Manager as PharStreamWrapperManager;
use TYPO3\PharStreamWrapper\Behavior as PharStreamWrapperBehavior;
use TYPO3\PharStreamWrapper\PharStreamWrapper;

/**
 * The DrupalKernel class is the core of Drupal itself.
@@ -479,27 +475,6 @@ public function boot() {
      $this->classLoader->setApcuPrefix($prefix);
    }

    // @todo clean-up for PHP 8.0+ https://www.drupal.org/node/3210486
    if (PHP_VERSION_ID < 80000 && in_array('phar', stream_get_wrappers(), TRUE)) {
      // Set up a stream wrapper to handle insecurities due to PHP's builtin
      // phar stream wrapper. This is not registered as a regular stream wrapper
      // to prevent \Drupal\Core\File\FileSystem::validScheme() treating "phar"
      // as a valid scheme.
      try {
        $behavior = new PharStreamWrapperBehavior();
        PharStreamWrapperManager::initialize(
          $behavior->withAssertion(new PharExtensionInterceptor())
        );
      }
      catch (\LogicException $e) {
        // Continue if the PharStreamWrapperManager is already initialized. For
        // example, this occurs during a module install.
        // @see \Drupal\Core\Extension\ModuleInstaller::install()
      }
      stream_wrapper_unregister('phar');
      stream_wrapper_register('phar', PharStreamWrapper::class);
    }

    $this->booted = TRUE;

    return $this;
−85

File deleted.

Loading