[New-bugs-announce] [issue43769] ipaddress module takes bytes input as valid ip address
report at bugs.python.org
Wed Apr 7 17:24:15 EDT 2021
New submission from Philip Bond <philip.bond at fasthosts.com>:
Hi I came across an issue with the ipaddress module where it doesent raise a ValueError when passed a non IP address.
Example see attached file use tabs for indents and that doesent work with the form.
What happens is it when it takes b'PING' as the call to ipaddress.IPv4Address(address) as the byte value == 4 it doesent raise a ValueError as the bytes for PING are 50 49 4e 47
nosy: ezio.melotti, philip.bond, vstinner
title: ipaddress module takes bytes input as valid ip address
versions: Python 3.6
Added file: https://bugs.python.org/file49940/cidr-gen.py
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce