Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[SecurityBundle] Fix listing listeners in profiler when authenticator manager is disabled#44016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:5.4from94noni:patch-1
Nov 12, 2021

Conversation

@94noni
Copy link
Contributor

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix profiler v5.4.0.beta1
LicenseMIT

I am trying to upgrade an app from v4.4 to v5.4 beta1
when going to the profiler > security panel, I got this error:
Neither the property "listeners" nor one of the methods "listeners()", "getlisteners()"/"islisteners()"/"haslisteners()" or "__call()" exist and have public access in class "Symfony\Component\VarDumper\Cloner\Data".

This PR tries to fix this in Twig, I do not know the collector logic to fix differently

@carsonbotcarsonbot added this to the5.4 milestoneNov 11, 2021
@carsonbotcarsonbot changed the titleUpdate security.html.twig[SecurityBundle] Update security.html.twigNov 11, 2021
<th>listeners</th>
<td>{{collector.firewall.listenersisempty?'(none)': profiler_dump(collector.firewall.listeners, maxDepth=1) }}</td>
<td>
{%ifcollector.firewall.listenersisdefined %}
Copy link
Member

@jderussejderusseNov 12, 2021
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Should'nt we display something is the listeners is not defined?

what's about (not tested)

<td>{{ collector.firewall.listeners|default ? profiler_dump(collector.firewall.listeners, maxDepth=1) : '(none)' }}</td>

@xabbuh
Copy link
Member

@94noni Can you show the output of composer show for your application when you run into this?

@94noni
Copy link
ContributorAuthor

@xabbuh here you are:

94noni/html2pdf-bundle               dev-main 5fb55a8  Html2pdf for Symfony.beberlei/doctrineextensions          v1.3.0            A set of extensions to Doctrine 2 that add support for ...behat/transliterator                 v1.3.0            String transliteratorcomposer/package-versions-deprecated 1.11.99.4         Composer plugin that provides efficient querying for in...composer/semver                      3.2.6             Semver library that offers utilities, version constrain...composer/xdebug-handler              2.0.2             Restarts a process without Xdebug.doctrine/annotations                 1.13.2            Docblock Annotations Parserdoctrine/cache                       2.1.1             PHP Doctrine Cache library is a popular cache implement...doctrine/collections                 1.6.8             PHP Doctrine Collections library that adds additional f...doctrine/common                      3.2.0             PHP Doctrine Common project is a library that provides ...doctrine/dbal                        2.13.4            Powerful PHP database abstraction layer (DBAL) with man...doctrine/deprecations                v0.5.3            A small layer on top of trigger_error(E_USER_DEPRECATED...doctrine/doctrine-bundle             2.4.3             Symfony DoctrineBundledoctrine/doctrine-migrations-bundle  3.2.0             Symfony DoctrineMigrationsBundledoctrine/event-manager               1.1.1             The Doctrine Event Manager is a simple PHP event system...doctrine/inflector                   2.0.4             PHP Doctrine Inflector is a small library that can perf...doctrine/instantiator                1.4.0             A small, lightweight utility to instantiate objects in ...doctrine/lexer                       1.2.1             PHP Doctrine Lexer parser library that can be used in T...doctrine/migrations                  3.3.0             PHP Doctrine Migrations project offer additional functi...doctrine/orm                         2.10.2            Object-Relational-Mapper for PHPdoctrine/persistence                 2.2.3             The Doctrine Persistence project is a set of shared int...doctrine/sql-formatter               1.1.2             a PHP SQL highlighting libraryegulias/email-validator              3.1.2             A library for validating emails against several RFCsfriendsofphp/php-cs-fixer            v3.2.1            A tool to automatically fix PHP code stylefriendsofphp/proxy-manager-lts       v1.0.5            Adding support for a wider range of PHP versions to ocr...gedmo/doctrine-extensions            v3.1.0            Doctrine2 behavioral extensionsknplabs/knp-components               v3.3.0            Knplabs component libraryknplabs/knp-paginator-bundle         v5.7.0            Paginator bundle for Symfony to automate pagination and...laminas/laminas-code                 4.4.3             Extensions to the PHP Reflection API, static code scann...laminas/laminas-json                 3.3.0             provides convenience methods for serializing native PHP...monolog/monolog                      2.3.5             Sends your logs to files, sockets, inboxes, databases a...nikic/php-parser                     v4.13.1           A PHP parser written in PHPob/highcharts-bundle                 1.7               Symfony Bundle that ease the use of highcharts to displ...php-cs-fixer/diff                    v2.0.2            sebastian/diff v3 backport support for PHP 5.6+phpstan/phpstan                      1.1.2             PHPStan - PHP Static Analysis Toolpsr/cache                            1.0.1             Common interface for caching librariespsr/container                        1.1.2             Common Container Interface (PHP FIG PSR-11)psr/event-dispatcher                 1.0.0             Standard interfaces for event handling.psr/log                              1.1.4             Common interface for logging librariespyrech/composer-changelogs           v1.8.0            Display changelogs after each composer updaterector/rector                        dev-main 4612216  Prefixed and PHP 7.1 downgraded version of rector/rectorsensio/framework-extra-bundle        v6.2.1            This bundle provides a way to configure your controller...spipu/html2pdf                       v5.2.3            Html2Pdf is a HTML to PDF converter written in PHP5 (it...stof/doctrine-extensions-bundle      v1.6.0            Integration of the gedmo/doctrine-extensions with Symfonyswiftmailer/swiftmailer              v6.3.0            Swiftmailer, free feature-rich PHP mailersymfony/apache-pack                  v1.0.1            A pack for Apache support in Symfonysymfony/asset                        v5.4.0-BETA1      Manages URL generation and versioning of web assets suc...symfony/browser-kit                  v5.4.0-BETA1      Simulates the behavior of a web browser, allowing you t...symfony/cache                        v5.4.0-BETA1      Provides an extended PSR-6, PSR-16 (and tags) implement...symfony/cache-contracts              v2.4.0            Generic abstractions related to cachingsymfony/config                       v5.4.0-BETA1      Helps you find, load, combine, autofill and validate co...symfony/console                      v5.4.0-BETA1      Eases the creation of beautiful and testable command li...symfony/css-selector                 v5.4.0-BETA1      Converts CSS selectors to XPath expressionssymfony/debug-bundle                 v5.4.0-BETA1      Provides a tight integration of the Symfony Debug compo...symfony/dependency-injection         v5.4.0-BETA1      Allows you to standardize and centralize the way object...symfony/deprecation-contracts        v2.4.0            A generic function and convention to trigger deprecatio...symfony/doctrine-bridge              v5.4.0-BETA1      Provides integration for Doctrine with various Symfony ...symfony/dom-crawler                  v5.4.0-BETA1      Eases DOM navigation for HTML and XML documentssymfony/dotenv                       v5.4.0-BETA1      Registers environment variables from a .env filesymfony/error-handler                v5.4.0-BETA1      Provides tools to manage errors and ease debugging PHP ...symfony/event-dispatcher             v5.4.0-BETA1      Provides tools that allow your application components t...symfony/event-dispatcher-contracts   v2.4.0            Generic abstractions related to dispatching eventsymfony/expression-language          v5.4.0-BETA1      Provides an engine that can compile and evaluate expres...symfony/filesystem                   v5.4.0-BETA1      Provides basic utilities for the filesystemsymfony/finder                       v5.4.0-BETA1      Finds files and directories via an intuitive fluent int...symfony/flex                         v1.17.2           Composer plugin for Symfonysymfony/form                         v5.4.0-BETA1      Allows to easily create, process and reuse HTML formssymfony/framework-bundle             v5.4.0-BETA1      Provides a tight integration between Symfony components...symfony/http-client                  v5.4.0-BETA1      Provides powerful methods to fetch HTTP resources synch...symfony/http-client-contracts        v2.4.0            Generic abstractions related to HTTP clientssymfony/http-foundation              v5.4.0-BETA1      Defines an object-oriented layer for the HTTP specifica...symfony/http-kernel                  v5.4.0-BETA1      Provides a structured process for converting a Request ...symfony/intl                         v5.4.0-BETA1      Provides a PHP replacement layer for the C intl extensi...symfony/mailer                       v5.4.0-BETA1      Helps sending emailssymfony/maker-bundle                 v1.34.1           Symfony Maker helps you create empty commands, controll...symfony/mime                         v5.4.0-BETA1      Allows manipulating MIME messagessymfony/monolog-bridge               v5.4.0-BETA1      Provides integration for Monolog with various Symfony c...symfony/monolog-bundle               v3.7.1            Symfony MonologBundlesymfony/options-resolver             v5.4.0-BETA1      Provides an improved replacement for the array_replace ...symfony/password-hasher              v5.4.0-BETA1      Provides password hashing utilitiessymfony/phpunit-bridge               v5.4.0-BETA1      Provides utilities for PHPUnit, especially user depreca...symfony/polyfill-ctype               v1.23.0           Symfony polyfill for ctype functionssymfony/polyfill-iconv               v1.23.0           Symfony polyfill for the Iconv extensionsymfony/polyfill-intl-grapheme       v1.23.1           Symfony polyfill for intl's grapheme_* functionssymfony/polyfill-intl-icu            v1.23.0           Symfony polyfill for intl's ICU-related data and classessymfony/polyfill-intl-idn            v1.23.0           Symfony polyfill for intl's idn_to_ascii and idn_to_utf...symfony/polyfill-intl-normalizer     v1.23.0           Symfony polyfill for intl's Normalizer class and relate...symfony/polyfill-mbstring            v1.23.1           Symfony polyfill for the Mbstring extensionsymfony/polyfill-php72               v1.23.0           Symfony polyfill backporting some PHP 7.2+ features to ...symfony/polyfill-php73               v1.23.0           Symfony polyfill backporting some PHP 7.3+ features to ...symfony/polyfill-php80               v1.23.1           Symfony polyfill backporting some PHP 8.0+ features to ...symfony/polyfill-php81               v1.23.0           Symfony polyfill backporting some PHP 8.1+ features to ...symfony/process                      v5.4.0-BETA1      Executes commands in sub-processessymfony/property-access              v5.4.0-BETA1      Provides functions to read and write from/to an object ...symfony/property-info                v5.4.0-BETA1      Extracts information about PHP class' properties using ...symfony/routing                      v5.4.0-BETA1      Maps an HTTP request to a set of configuration variablessymfony/runtime                      5.4.x-dev 1fb6017 Enables decoupling PHP applications from global statesymfony/security-bundle              v5.4.0-BETA1      Provides a tight integration of the Security component ...symfony/security-core                v5.4.0-BETA1      Symfony Security Component - Core Librarysymfony/security-csrf                v5.4.0-BETA1      Symfony Security Component - CSRF Librarysymfony/security-guard               v5.4.0-BETA1      Symfony Security Component - Guardsymfony/security-http                v5.4.0-BETA1      Symfony Security Component - HTTP Integrationsymfony/serializer                   v5.4.0-BETA1      Handles serializing and deserializing data structures, ...symfony/service-contracts            v2.4.0            Generic abstractions related to writing servicessymfony/stopwatch                    v5.4.0-BETA1      Provides a way to profile codesymfony/string                       v5.4.0-BETA1      Provides an object-oriented API to strings and deals wi...symfony/swiftmailer-bundle           v3.5.2            Symfony SwiftmailerBundlesymfony/translation                  v5.4.0-BETA1      Provides tools to internationalize your applicationsymfony/translation-contracts        v2.4.0            Generic abstractions related to translationsymfony/twig-bridge                  v5.4.0-BETA1      Provides integration for Twig with various Symfony comp...symfony/twig-bundle                  v5.4.0-BETA1      Provides a tight integration of Twig into the Symfony f...symfony/validator                    v5.4.0-BETA1      Provides tools to validate valuessymfony/var-dumper                   v5.4.0-BETA1      Provides mechanisms for walking through any arbitrary P...symfony/var-exporter                 v5.4.0-BETA1      Allows exporting any serializable PHP data structure to...symfony/web-profiler-bundle          v5.4.0-BETA1      Provides a development tool that gives detailed informa...symfony/webpack-encore-bundle        v1.12.0           Integration with your Symfony app & Webpack Encore!symfony/workflow                     v5.4.0-BETA1      Provides tools for managing a workflow or finite state ...symfony/yaml                         v5.4.0-BETA1      Loads and dumps YAML filestecnickcom/tcpdf                     6.4.2             TCPDF is a PHP class for generating PDF documents and b...twig/extra-bundle                    v3.3.3            A Symfony bundle for extra Twig extensionstwig/intl-extra                      v3.3.3            A Twig extension for Intltwig/twig                            v3.3.3            Twig, the flexible, fast, and secure template language ...vincentlanglet/twig-cs-fixer         0.4.1             A tool to automatically fix Twig code style

FYI, it is when thesecurity.enable_authenticator_manager: false

After upgrading to the new security logic, there is no problem

@chalasr
Copy link
Member

The bug was introduced in3ec5e96#diff-e0854f6b2ba3388ec69473baf0dcfcba7db87daad4a3efc86d3a063a00407830R197 whereFirewallConfig::getListeners() was renamed togetAuthenticators() (that's inline with the new authenticator system).

I think we can always useauthenticators instead oflisteners here, so the right fix would be to remove the{% if collector.authenticatorManagerEnabled %} condition along with the entireelse block.

@94noni
Copy link
ContributorAuthor

@chalasr I've remade the PR, is that what you had in mind? feel free to take over if needed :)

@chalasrchalasr changed the title[SecurityBundle] Update security.html.twig[SecurityBundle] Fix listing listeners in profiler when authenticator manager is disabledNov 12, 2021
@chalasr
Copy link
Member

It is but I changed my mind meanwhile :) Just force-pushed your PR.

94noni reacted with thumbs up emoji

@fabpot
Copy link
Member

Thank you@94noni.

@fabpotfabpot merged commit9211bcc intosymfony:5.4Nov 12, 2021
This was referencedNov 14, 2021
@94noni94noni deleted the patch-1 branchDecember 23, 2021 17:18
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@jderussejderussejderusse left review comments

@fabpotfabpotfabpot approved these changes

@chalasrchalasrchalasr approved these changes

@wouterjwouterjAwaiting requested review from wouterj

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

7 participants

@94noni@xabbuh@chalasr@fabpot@jderusse@derrabus@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp