is_hostname_safe() is not fully compliant

Bug #1468508 reported by Chris St. Pierre
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Chris St. Pierre

Bug Description

is_hostname_safe() contains a number of errors:

* It insists on lowercase hostnames; RFC 952 clearly states that "No distinction is made between upper and lower case."
* It permits underscores in hostnames. Underscores are valid in DNS names, but not in hostnames.
* It permits labels after the first to start with a dash, when the RFCs provide for no difference between the first and subsequent labels.
* It sets the maximum length to 255 characters, when the maximum length is actually 254 octets, which translates to 253 characters.

It also has some performance issues that can be cleaned up at the same time.

Changed in ironic:
assignee: nobody → Chris St. Pierre (stpierre)
status: New → In Progress
Dmitry Tantsur (divius)
summary: - is_hostname_safe() is broken
+ is_hostname_safe() is not fully compliant
Changed in ironic:
importance: Undecided → Low
Changed in ironic:
assignee: Chris St. Pierre (stpierre) → Lucas Alvares Gomes (lucasagomes)
Changed in ironic:
assignee: Lucas Alvares Gomes (lucasagomes) → Chris St. Pierre (stpierre)
Changed in ironic:
status: In Progress → Fix Committed
Changed in ironic:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.