[2.1] Address issues with proxy lookups#9229
Open
sbulen wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
I'm still doing testing... (I tested as best I can without actually having a proxy!)
|
Signed-off-by: Shawn Bulen <bulens@pacbell.net>
Signed-off-by: Shawn Bulen <bulens@pacbell.net>
Contributor
Author
|
Ready for review/test. My core tests are below: |
Contributor
Author
|
Note that the old CIDR lookup algorithm works... I'd never seen it done nibble-by-nibble before like that. I still prefer the rewrite:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9143
I took a stab at this.
Changes:
@todo's in there noting outstanding ipv6 work was needed. This was a 'nuke it from orbit and start over' scenario; it needed simplifying.CONCERN:
Note that the ban check validates against BOTH the member_ip and member_ip2, i.e., both the proxy and the end user IP. Also note that the proxy may be using a valid 'localhost' IP. So... When we get this working, a ban on a user by IP can effectively ban a valid 'localhost' IP, i.e., a huge swath of (or even all...) proxy traffic.
Here:
SMF/Sources/Security.php
Line 181 in 2ce5fbc
I believe we should only check the end user in the ban check, not the proxy server...
If agreed, I'll add this to this PR...
If we wish to proceed with this I'll submit the 3.0 version once approved.