-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Implementing trusted_proxies CIDR notation capability for IPv6 #12535
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
Closed
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
4dd4379
Adding IpAddress handling utility classes in OC\Net namespace
olivermg 5efc12f
Working on IpAddress classes for CIDR
olivermg 54c3694
Merge branch 'master' of github.com:nextcloud/server into feature/655…
olivermg 9c98e43
Adding test for IpAddressFactory
olivermg fc7b744
adding tests to IpAddressV4Test.php
olivermg 9674d3b
Merge branch 'master' of github.com:nextcloud/server into feature/655…
olivermg 7b9f5bc
adding tests for IpAddressV4
olivermg 587025a
renaming tests
olivermg 8d35b0e
adding tests for IpAddressV6
olivermg 5fa3396
adding tests for localhost
olivermg af610cd
moving common methods from IPAddressV[46] to AbstractIpAddress
olivermg a5503ad
adding author to Request.php
olivermg cf554e0
removing empty setUp & tearDown methods from tests
olivermg 0920691
shrinking IIpAddress interface to sensible minimum
olivermg b26e862
Merge branch 'master' of github.com:nextcloud/server into feature/655…
olivermg b4a5d8f
remove matchesTrustedProxy function from Request.php
olivermg 02c6ed1
adding license headers to new source files
olivermg ad76224
updating config.sample.php to reflect IPv6 CIDR notation
olivermg 361871d
adding function header comments
olivermg efc02c6
adding license file headers to test files
olivermg 29488ec
Merge branch 'master' of github.com:nextcloud/server into feature/655…
olivermg caf3df2
updating license statements in files of OC\Net
olivermg 4ad17fc
pushing @since in \OC\Net\IIpAddress to 16.0.0
olivermg 9b66b4f
moving IIpAddress and IpAddressFactory to OCP namespace
olivermg 36aec3f
adding @author lines
olivermg 811befa
removing obsolete members from concrete IpAddressV[46] classes
olivermg f82f4fb
introduce IIpAddressFactory and move IpAddressFactory to OC namespace
olivermg 733b416
Merge branch 'master' of github.com:olivermg/server into feature/6550…
olivermg 638d876
Merge branch 'master' of github.com:nextcloud/server into feature/655…
olivermg bc413ea
inject IIpAddressFactory into Request
olivermg a8f7ea4
check if an IIpAddressFactory exists in Request
olivermg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
moving common methods from IPAddressV[46] to AbstractIpAddress
Signed-off-by: Oliver Wegner <[email protected]>
- Loading branch information
commit af610cd4d168695d6d712237b4532f29749a0fd9
There are no files selected for viewing
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This regex matches invalid IPv4 subnets: https://regex101.com/r/tjtE95/1 (same for IPv6 in the
IpAddressV6class).As IP address are numbers, I think you could use numerical comparison and avoid relying on regexes (that will most certainly be incorrect in a way or another). I'm not really into PHP so I'm not sure what's the best way to do that (to be honest it bugs me that this is not part of the standard library).
Also, I think it would be useful to warn the administrator when they put a wrong value in the configuration (thus using another "parsing" method).