php-solid-server
php-solid-server copied to clipboard
Bump laminas/laminas-diactoros from 2.8.0 to 2.11.1
Bumps laminas/laminas-diactoros from 2.8.0 to 2.11.1.
Release notes
Sourced from laminas/laminas-diactoros's releases.
2.11.1
Release Notes for 2.11.1
This is a SECURITY release. All users are encouraged to upgrade immediately.
Added
This release adds features to allow filtering a
ServerRequestas generated byLaminas\Diactoros\ServerRequestFactory::fromGlobals()for the purposes of initialization. Examples include:
- Adding a request identifier.
- Using
X-Forwarded-*headers to modify the URL to represent the original client request.The features are based on a new interface,
Laminas\Diactorors\ServerRequestFilter\FilterServerRequestInterface, which defines a single method:public function __invoke( \Psr\Http\Message\ServerRequestInterface $request ): \Psr\Http\Message\ServerRequestInterfaceWe provide two implementations, as follows:
Laminas\Diactoros\ServerRequestFilter\DoNotFilterwill return the provided request verbatim.Laminas\Diactoros\ServerRequestFilter\FilterUsingXForwardedHeadershas named constructors that allow you to define how and whenX-Forwarded-*headers are used to modify the URI instance associated with the request. These methods are:
trustAny(): this method generates a filter instance that will trust allX-Forwarded-*headers from any source.trustReservedSubnets(array $trustedHeaders = ?): this method generates a filter instance that only modifies the URL if the IP address of the requesting server is from a reserved, private subnet (localhost; classes A, B, and C subnets; and IPv6 private and local-link subnets). By default, it will trust allX-Forwarded-*headers from these sources, but you may specify a list to allow via the$trustedHeadersargument.trustProxies(array $proxyCIDRList, array $trustedHeaders = ?): this method will generate a filter instance that only modifies the URL if the requesting server matches an entry in the$proxyCIDRList. These entries may be IP addresses, or any IPv4 or IPv6 CIDR subnets. By default, it will trust allX-Forwarded-*headers from these sources, but you may specify a list to allow via the$trustedHeadersargument.
ServerRequestFactory::fromGlobals()now accepts aFilterServerRequestInterfaceinstance as the optional argument$requestFilter. If none is provided, it uses one as produced byFilterUsingXForwardedHeaders::trustReservedSubnets().Deprecated
- The function
Laminas\Diactoros\marshalUriFromSapi()is deprecated, and no longer used internally.Changed
Laminas\Diactoros\ServerRequestFactory::fromGlobals()no longer consumesmarshalUriFromSapi(), and instead inlines an alternate implementation. The new implementation does not considerX-Forwarded-*headers by default when generating the associated URI instance. Internally, if noFilterServerRequestInterfaceimplementation is provided, it defaults to using an instance returned byFilterUsingXForwardeHeaders::trustReservedSubnets(). If you previously relied onX-Forwarded-*headers, you MAY need to update your code to use either theFilterUsingXForwardedHeaders::trustAny()orFilterUsingXForwardedHeaders::trustProxies()methods to generate a filter to use withServerRequestFactory::fromGlobals().Fixed
- Fixes CVE-2022-31109
2.11.1
- Total issues resolved: 0
- Total pull requests resolved: 0
- Total contributors: 0
2.11.0
Release Notes for 2.11.0
... (truncated)
Commits
25b11d4Merge pull request from GHSA-8274-h5jp-97vr4b5d1adqa: apply Psalm rules and update baseline4d0cf3edocs: remove references to new major v3 and changes to server request filteringd94d8a8refactor: removetrustNone()method5c40729docs: update documentation to reflect changes following refactoring83a7fc5refactor: mark IPRange class internal73dffa8refactor: remove X-Forwarded filter factory0aa29baqa: fixes as proposed by Marco80fc3derefactor: default FilterServerRequestInterface instance is now FilterUsingXFo...dcaf760feature: addstrustReservedSubnets(array $trustedHeaders = [])- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labelswill set the current labels as the default for future PRs for this repo and language@dependabot use these reviewerswill set the current reviewers as the default for future PRs for this repo and language@dependabot use these assigneeswill set the current assignees as the default for future PRs for this repo and language@dependabot use this milestonewill set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the Security Alerts page.