diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-11-22 15:53:41 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-11-23 10:23:02 +0000 |
commit | e7890cc401886e9cae2b279bff48895d28e8f3c6 (patch) | |
tree | 679b0a884c98484eca3054b419c78a94f8619b76 /tests | |
parent | e98ee218bed76197af2f09b0be088298f344e1b1 (diff) | |
download | nextcloud-server-e7890cc401886e9cae2b279bff48895d28e8f3c6.tar.gz nextcloud-server-e7890cc401886e9cae2b279bff48895d28e8f3c6.zip |
Improve normalizer detecting IPv4 inside of IPv6
The subnet for an IPv4 address inside of IPv6 is now returned in its
IPv4 form.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Security/Normalizer/IpAddressTest.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/lib/Security/Normalizer/IpAddressTest.php b/tests/lib/Security/Normalizer/IpAddressTest.php index 7492e182c32..bb487659ced 100644 --- a/tests/lib/Security/Normalizer/IpAddressTest.php +++ b/tests/lib/Security/Normalizer/IpAddressTest.php @@ -40,7 +40,15 @@ class IpAddressTest extends TestCase { ], [ '::ffff:192.168.0.123', - '::ffff:192.168.0.123/32', + '192.168.0.123/32', + ], + [ + '0:0:0:0:0:ffff:192.168.0.123', + '192.168.0.123/32', + ], + [ + '0:0:0:0:0:ffff:c0a8:7b', + '192.168.0.123/32', ], [ '2001:0db8:85a3:0000:0000:8a2e:0370:7334', |