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

[Form][FrameworkBundle] Regression with configuration of default CSRF Tokens #59867

Open
@PhilETaylor

Description

@PhilETaylor

Symfony version(s) affected

7.2.4

Description

regression caused by#59728

Symfony\Component\Security\Csrf\CsrfTokenManager::getToken(): Argument#1 ($tokenId) must be of type string, null given, called in /app/vendor/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php on line 80

Seems passing any array to thesetAttributes causes this unless you passcsrf_token_id value in that array, there is no sane default applied.

In my case I was passing other attributes in this array, but not the csrf_token_id, as that was not needed before today.

How to reproduce

Minimum reproducer is

$this->createFormBuilder()->setAttributes([/* blank array, or some other key pairs, not including csrf_token_id*/])->getForm()->createView();

Possible Solution

No response

Additional Context

related changehttps://github.com/symfony/symfony/pull/59728/files#diff-438ae1976074de3d600070f2d02f4e87bcbc847d7826ca8aaeadc4231c5d701f

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp