[New-bugs-announce] [issue34453] ipaddress module accepts some strange IPv6 addresses that it shouldn't

Luke Kenneth Casson Leighton report at bugs.python.org
Tue Aug 21 16:22:58 EDT 2018


New submission from Luke Kenneth Casson Leighton <lkcl at lkcl.net>:

adding some unit tests to some code being written,
searched randomly on the internet for an IPv6 test
suite and found one in php *shudder*
# https://github.com/gws/ipv6-address-test/blob/master/Tests/Ipv6TestCase.php

converted it to python, and was surprised to find that
there are two cases which the ipaddress.IPv6Address
module accepts, that it should not!

attached is a quick-and-dirty hacked together unit test
which shows the issue.  the full suite may be found
here (over 400 ipv6 addresses to test):

https://github.com/threefoldtech/jumpscale_core/blob/development_dynamic/tests/jumpscale_test/test10_j_data_types.py

----------
components: Tests
files: ipv6test.py
messages: 323843
nosy: lkcl
priority: normal
severity: normal
status: open
title: ipaddress module accepts some strange IPv6 addresses that it shouldn't
type: behavior
versions: Python 3.5, Python 3.6
Added file: https://bugs.python.org/file47757/ipv6test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34453>
_______________________________________


More information about the New-bugs-announce mailing list