You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError:
Argument 1 passed to str_contains() must be of the type string, null given, called in [REDACTED]/vendor/symfony/security-http/Firewall/ChannelListener.php on line 52
at vendor/symfony/polyfill-php80/bootstrap.php:29
at str_contains(null, 'proto=https')
(vendor/symfony/security-http/Firewall/ChannelListener.php:52)
at Symfony\Component\Security\Http\Firewall\ChannelListener->supports(object(Request))
(vendor/symfony/security-bundle/Debug/WrappedLazyListener.php:38)
at Symfony\Bundle\SecurityBundle\Debug\WrappedLazyListener->supports(object(Request))
(vendor/symfony/security-bundle/Security/LazyFirewallContext.php:52)
at Symfony\Bundle\SecurityBundle\Security\LazyFirewallContext->__invoke(object(RequestEvent))
(vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php:59)
at Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener->callListeners(object(RequestEvent), object(Generator))
(vendor/symfony/security-http/Firewall.php:86)
at Symfony\Component\Security\Http\Firewall->onKernelRequest(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
(vendor/symfony/event-dispatcher/EventDispatcher.php:230)
at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(RequestEvent))
(vendor/symfony/event-dispatcher/EventDispatcher.php:59)
at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
(vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:151)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
(vendor/symfony/http-kernel/HttpKernel.php:133)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:79)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:199)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:37)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:35)
at require_once('[REDACTED]/vendor/autoload_runtime.php')
(public/index.php:5)
Description
The PHP 8 polyfill for str_contains does not accept null in it's arguments. This problem has shown up in more than one place. e.g. #42290 and in
…ener (bobvandevijver)
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Security] Fix str_contains type mismatch in ChannelListener
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#42300, Part of #41552
| License | MIT
| Doc PR | -
Also use a default empty string in the `ChannelListener` before using `str_contains`.
Commits
-------
28ae62d [Security] Fix str_contains type mismatch in ChannelListener
Symfony version(s) affected: 5.3.5
Stack Trace
Description
The PHP 8 polyfill for str_contains does not accept null in it's arguments. This problem has shown up in more than one place. e.g. #42290 and in
symfony/src/Symfony/Component/Security/Http/Firewall/ChannelListener.php
Line 52 in 534e1ed
DumpDataCollector.php avoids the issue by checking for the existence of the header.
symfony/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php
Line 118 in 61ecf9b
The solution is probably the same as #42290.
The text was updated successfully, but these errors were encountered: