8000 [Security] Multiple comma-separated IP addresses in access_control rule by emiel-silverstreet · Pull Request #26560 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Security] Multiple comma-separated IP addresses in access_control rule #26560

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

Conversation

emiel-silverstreet
Copy link
Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

When using multiple comma-separated IP addresses in an access_control rule in XML they were used as one IP address.

@nicolas-grekas nicolas-grekas added this to the 2.7 milestone Mar 16, 2018
@javiereguiluz
Copy link
Member

But shouldn't you define an array of IPs in the XML instead of "hacking" a string to simulate an array with commas?

@nicolas-grekas
Copy link
Member
8000

@javiereguiluz can still be more convenient to write, and can be more natural to some (as suggested by the existence of this PR?) But would be a new feature then of course.

@stof
Copy link
Member
stof commented Mar 19, 2018

Adding support for comma-separated IPs is also a new feature.

@javiereguiluz
Copy link
Member

@nicolas-grekas I never use XML, so maybe what I'm saying doesn't make sense. However, in other parts of Symfony, when you define multiple values in XML, you use an XML array, not a comma-separated string.

So, I think the user should define this:

<option name="ips">
    <value>127.0.0.1</value>
    <value>::1</value>
</option>

instead of this:

<option name="ips" value="127.0.0.1, ::1"></option>

@nicolas-grekas
Copy link
Member

Closing for the reason given by @javiereguiluz as his reasoning look correct to me.
@emiel-silverstreet of course if you don't agree, we can reopen and continue the discussion.

javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Mar 21, 2018
This PR was merged into the 2.7 branch.

Discussion
----------

fix some security config examples

see also symfony/symfony#26560

Commits
-------

e687e24 fix some security config examples
@emiel-silverstreet emiel-silverstreet deleted the bugfix/split_ips branch March 26, 2018 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0