#28754: validate_ipv46_address validator allows IP addresses to begin with a 
first
octet of zero
-------------------------------------+-------------------------------------
     Reporter:  frankston            |                    Owner:  (none)
         Type:  Bug                  |                   Status:  closed
    Component:  Core (Other)         |                  Version:  1.11
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  IP, regular          |             Triage Stage:
  expression                         |  Someday/Maybe
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Baptiste Mispelon):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 * Since #27793, Django's IP address validation is a think wrapper around
 Python's `ipaddress` module, we don't use regexps anymore. As far as I can
 tell, no issue was ever opened against cpython to request that leading 0
 in IP addresses be marked as invalid [1].
 * I can't find a reference explaining why IP address starting with 0 would
 be invalid (RFC 1700 [2] says they are valid but "can only be used as a
 source address"). On my machine, `ping 0.1.2.3` does not give any error.

 For these reasons, I'm going to mark this ticket as invalid. Feel free to
 reopen if I've missed something or if you disagree.


 [1]
 
https://bugs.python.org/issue?%40search_text=&ignore=file%3Acontent&title=ipaddress&%40columns=title&id=&%40columns=id&stage=&creation=&creator=&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=&versions=&dependencies=&assignee=&keywords=&priority=&status=&%40columns=status&resolution=&nosy_count=&message_count=&%40group=&%40pagesize=50&%40startwith=0&%40sortdir=on&%40action=search
 [2] https://tools.ietf.org/html/rfc1700#page-4

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28754#comment:8>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/067.b321dce8655be00ea8f9d9c177c35b39%40djangoproject.com.

Reply via email to