#36098: TypeError: object of type 'IPv6Address' has no len() when running tests
with GeoDjango
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed
Component: GIS | Version: 5.1
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by sysedit):
Hello,
the fix for the CVE introduces the following change:
{{{
from django.db.models import GenericIPAddressField
GenericIPAddressField().run_validators('fe80::f59c:37a5:cab1:8bd9%ethernet_32770')
}}}
This would be ok with Django 5.0.10 but would raise ValidationError:
['Enter a valid IPv4 or IPv6 address.'] in Django 5.0.11 as the string is
40 char long and not 39.
As this ticket only fixes non-str handling, the exception will still be
raised, correct ?
Should the max-length be raised to something larger, like 65 ?
https://superuser.com/questions/381022/how-many-characters-can-an-ip-
address-be seems to indicate that this would be the common value to handle
IPv6 with scope zone properly ?
--
Ticket URL: <https://code.djangoproject.com/ticket/36098#comment:13>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019483db5f8d-23f82de6-5256-4942-bf2a-9e2f6c16bb91-000000%40eu-central-1.amazonses.com.