[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #25055 [Core Tor/Tor]: string_is_valid_hostname() returns true for IPv4 addresses



#25055: string_is_valid_hostname() returns true for IPv4 addresses
-------------------------------+------------------------------------
 Reporter:  teor               |          Owner:  (none)
     Type:  defect             |         Status:  needs_revision
 Priority:  Medium             |      Milestone:  Tor: 0.3.4.x-final
Component:  Core Tor/Tor       |        Version:
 Severity:  Normal             |     Resolution:
 Keywords:  IPv6 IPv4 tor-dns  |  Actual Points:
Parent ID:                     |         Points:  1
 Reviewer:                     |        Sponsor:
-------------------------------+------------------------------------
Changes (by teor):

 * status:  needs_review => needs_revision


Comment:

 Please update the function comment for string_is_valid_hostname(), to say
 that it only accepts hostnames that end in an alphabetical TLD.
 Comment the two blocks within the inner loop, and explain why they're
 different.

 Add unit tests for alphabetical and non-alphabetical TLDs.
 Add a unit test containing a punycode TLD, and modify the function to
 accept it, and modify the function comment. (Hint: the TLD can contain
 dashes.)

 Explain why it's ok to use ctype.h, because the previous code didn't.
 Do we use it elsewhere in Tor?
 Is it available and consistent on all supported platforms?
 Is this code called when parsing votes or creating the consensus?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25055#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs