8000 Bug: symfony/http-foundation fails to parse complex queries in v5.2.0 · Issue #39307 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Bug: symfony/http-foundation fails to parse complex queries in v5.2.0 #39307
Closed
@aimeos

Description

@aimeos

Symfony version(s) affected: symfony/http-foundation:5.2.0

Description

The new code fails to parse more complex query parameters like:
filter[&&][==][product.code]=demo
which is sent as:
filter[%26%26][%3D%3D][product.code]=demo

The result is something like:

    []] => Array
        (
            [0] => =][product.code]=demo
        )

which is invalid and hex2bin() then reports:
hex2bin(): Hexadecimal input string must have an even length

Possible Solution

The problem is the custom parseQuery() method which fails to parse such input correctly:

symfony/http-foundation@v5.1.9...v5.2.0#diff-b6d0c8db4eac8fff2ef3214f93fdf07ad0c161ba4d238a514ba4ab6633dfea9dR196-R253

The PHP parse_str() method used in v5.1.9 works fine.

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

      0