Thanks to visit codestin.com
Credit goes to github.com

Skip to content

'The given value "127.0.0.1,127.0.0.2" in the "security.access_control" config option is not a valid IP address' with environment variable value #40865

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zidaneus opened this issue Apr 19, 2021 · 0 comments

Comments

@zidaneus
Copy link

But in fact, you can specify ips as a string (through envs) and it works correctly (if ips = "%env(APP_IP_ADDRESSES)%"). That is, the problem occurs only when validating the bundle configuration.

Originally posted by @zidaneus in #40864 (comment)

nicolas-grekas added a commit that referenced this issue May 7, 2021
… comma-separated string (edefimov)

This PR was merged into the 5.2 branch.

Discussion
----------

[Security] Allow ips parameter in access_control to accept comma-separated string

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #40881, #40864, #40865
| License       | MIT

PR #38149 introduced a new feature to accept a comma-separated string in ip adresses setting in `access_control` configuration  section of security bundle.

However the feature works in inconsistent manner: comma-separated string can be successfully passed via environment variable, but can not be passed as plain string. This PR changes this inconsistent behavior by allowing validation pass if comma-separated list of ip addresses is given in plain string.

More detailed explanation about the inconsistent behavior can be found [here](#40881 (comment))

Commits
-------

8947482 [SecurityBundle] Allow ips parameter in access_control accept comma-separated string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants