8000 IP based access_control fails inversely by PhazeonPhoenix · Pull Request #3812 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

IP based access_control fails inversely #3812

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
wants to merge 1 commit into from
Closed

IP based access_control fails inversely #3812

wants to merge 1 commit into from

Conversation

PhazeonPhoenix
Copy link

This control does the opposite of what the documentation states. Addresses defined in security.yml are denied rather than allowed if the request IP matches. I pulled the logic from checkIp4() and checkIp6() and the logic is correct there. Issue is the inversion in matches() line 139.

@stof
Copy link
Member
stof commented Apr 7, 2012

The RequestMatcher has a method matchIp(). So it is logical that the match method returns false when the Request does not match the ip. With your change, it will return false when it matches

@stof
Copy link
Member
stof commented Apr 7, 2012

btw, this would break the limitation of the profiler to specific IP addresses, but enabling the profiler for all IPs except the specified ones.

@schmittjoh
Copy link
Contributor

Could you open a ticket on the docs repository? This patch cannot be applied.

@schmittjoh schmittjoh closed this Apr 7, 2012
@PhazeonPhoenix
Copy link
Author

There is still an issue here. The point is what stof described is already happening to the access control rules. Anyone coming from an IP address defined in security.yml is rejected. This is the offending logic. Clearly there is an inconsistency somewhere in the code since two separate functions using the same class for the same function are behaving differently. Is the doc repository the best place to file this issue?

@schmittjoh
Copy link
Contributor

Maybe we can add another matcher implementation, but this patch would create security vulnerabilities in many applications.

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

Successfully merging this pull request may close these issues.

3 participants
0