Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 30, 2024 via composer

typo3/phar-stream-wrapper v3.1.7

Interceptors for PHP's native phar:// stream handling
Package summary
Share
0
issues
1
license
1
MIT
Package created
26 Aug 2018
Version published
20 Sep 2021
Maintainers
3
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
typo3/phar-stream-wrapper@v3.1.7
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of typo3/phar-stream-wrapper 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does typo3/phar-stream-wrapper do?

The typo3/phar-stream-wrapper package is a powerful tool designed to mitigate potential security vulnerabilities associated with PHP's native phar:// stream handling. Inspired by research on insecure deserialization and obfuscation strategies, TYPO3 aims to introduce a PharStreamWrapper that intercepts the invocation of phar:// streams in PHP, restricting its usage to only predefined locations in the file system. The core benefit of this is to prevent potential obscure and insecure file inclusion within resources such as images.

How do you use typo3/phar-stream-wrapper?

To use the typo3/phar-stream-wrapper, you first need to install it via composer package. For PHP v7.0 installation use the following command:

composer require typo3/phar-stream-wrapper ^3.0

For PHP v5.3 use this command:

composer require typo3/phar-stream-wrapper ^2.0

After you have installed the typo3/phar-stream-wrapper, you can use it in your PHP code. An example of how to use typo3/phar-stream-wrapper is as follows:

$behavior = new \TYPO3\PharStreamWrapper\Behavior();
\TYPO3\PharStreamWrapper\Manager::initialize(
    $behavior->withAssertion(new PharExtensionInterceptor())
);

if (in_array('phar', stream_get_wrappers())) {
    stream_wrapper_unregister('phar');
    stream_wrapper_register('phar', 'TYPO3\\PharStreamWrapper\\PharStreamWrapper');
}

In this example, the PharStreamWrapper denies all stream wrapper invocations files not having the .phar suffix.

Where are the typo3/phar-stream-wrapper docs?

Notably, the guide and information for typo3/phar-stream-wrapper can be found directly in the package's README on the associated GitHub page. This README file contains valuable information including the installation process, various examples, ways to use interceptors, and using the Reader and Helper function. Remember to refer to this resource for an in-depth understanding about using the typo3/phar-stream-wrapper effectively.