Skip to content

[BC][Config][Security] No ability to use env variables in security config after update to SF 4.3 #32108

@mleczakm

Description

@mleczakm

Symfony version(s) affected: 4.3

Description
After update to SF 4.3 apps with environment variables use in security config part stops working, because of this 857ac95

How to reproduce
Use env variable in security access control, for example:

security:
    ...
    access_control:
        - { path: '^/app', roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: '%env(APP_IP)%' }

For versions below 4.3 it works as expected, on 4.3 exception is thrown:
The given "%env(APP_IP)%" value in the "access_control" config option is not a valid IP address.

Possible Solution
Do not validate env variables

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