Opened 6 years ago

Closed 6 years ago

#12054 closed (wontfix)

Comments: Data truncated for column 'ip_address' when using IPv6

Reported by: kennu Owned by: nobody
Component: contrib.comments Version: 1.1
Severity: Keywords: comments ipv6 address
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The contrib.comments system creates the django_comments.ip_address field as a char(15), which doesn't fit an IPv6 REMOTE_ADDR. Entering a comment causes the MySQL error "Data truncated for column 'ip_address'."

I believe IPv6 needs at least 39 characters to store any IP address. After manually modifying the field length in MySQL, the comment system works again.

Change History (2)

comment:1 Changed 6 years ago by ubernostrum

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Django's IPAddressField, at the present moment, only supports IPv4.

comment:2 Changed 6 years ago by russellm

  • Resolution set to wontfix
  • Status changed from new to closed

Closing wontfix because it isn't really a problem with Comments - it's a problem with IPAddressField, and support for a IPv6 address field is covered by #811.

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