Opened 9 years ago

Closed 9 years ago

#26269 closed Bug (fixed)

is_valid_ipv6_address() doens't reject addresses with spaces

Reported by: Nick Malakhov Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

My colleague have found a case when the default validator for the GenericIPAddressField passes incorrect value which causes the DataError exception during saving the value to the database.

Exception Type: DataError at /filter/dns/add/
Exception Value: invalid input syntax for type inet: "fe80::2000:f8ff: fe21:67cf"
LINE 1: ..."filter_dns" ("ipaddress", "description") VALUES (E'fe80::20...

The value have a space character after one of the colons: fe80::2000:f8ff: fe21:67cf

Change History (2)

comment:1 by Tim Graham, 9 years ago

Component: Database layer (models, ORM)Core (Other)
Has patch: set
Keywords: vaslidator removed
Summary: is_valid_ipv6_address passes values with spacesis_valid_ipv6_address() doens't reject addresses with spaces
Triage Stage: UnreviewedAccepted

comment:2 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In ee69789f:

Fixed #26269 -- Prohibited spaces in is_valid_ipv6_address().

Note: See TracTickets for help on using tickets.
Back to Top