diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-02-12 08:54:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-12 08:54:19 +0100 |
commit | 004f7fa8e141b159cc76f99cc041eec215444236 (patch) | |
tree | e29c587d397b22ccc88eb26b489e363fd8752837 /tests | |
parent | 44f6303dc3ebad3ed227ac5a37b8e04bab794eeb (diff) | |
parent | f1ea56b5024729e01050249a0c4ee7ac28faca83 (diff) | |
download | nextcloud-server-004f7fa8e141b159cc76f99cc041eec215444236.tar.gz nextcloud-server-004f7fa8e141b159cc76f99cc041eec215444236.zip |
Merge pull request #14149 from nextcloud/fix/throttler_bitmask
Fix the thorrtler whitelist bitmask
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Security/Bruteforce/ThrottlerTest.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/lib/Security/Bruteforce/ThrottlerTest.php b/tests/lib/Security/Bruteforce/ThrottlerTest.php index dac12a00dcd..da386db9d2d 100644 --- a/tests/lib/Security/Bruteforce/ThrottlerTest.php +++ b/tests/lib/Security/Bruteforce/ThrottlerTest.php @@ -101,6 +101,27 @@ class ThrottlerTest extends TestCase { true, ], [ + '10.10.10.10', + [ + 'whitelist_0' => '10.10.10.11/31', + ], + true, + ], + [ + '10.10.10.10', + [ + 'whitelist_0' => '10.10.10.9/31', + ], + false, + ], + [ + '10.10.10.10', + [ + 'whitelist_0' => '10.10.10.15/29', + ], + true, + ], + [ 'dead:beef:cafe::1', [ 'whitelist_0' => '192.168.0.0/16', @@ -128,6 +149,14 @@ class ThrottlerTest extends TestCase { true, ], [ + 'dead:beef:cafe::1111', + [ + 'whitelist_0' => 'dead:beef:cafe::1100/123', + + ], + true, + ], + [ 'invalid', [], false, |