[tor-bugs] #25055 [Core Tor/Tor]: string_is_valid_hostname() returns true for IPv4 addresses
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Feb 21 14:50:51 UTC 2018
#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.3.x-final
Component: Core Tor/Tor | Version: Tor:
| 0.3.2.1-alpha
Severity: Normal | Resolution:
Keywords: IPv6 IPv4 tor-dns 032-backport | Actual Points:
must-033 |
Parent ID: #25036 | Points: 1
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Changes (by nickm):
* status: merge_ready => needs_revision
Comment:
The `tor_assert(len > 0)` check in `string_is_valid_dest()` makes me quite
nervous. There's nothing in the documentation for that function that says
you can't call it with "" as an argument. It would make much more sense
to me if the function just returns 0 when `len == 0`.
I don't understand why you changed the check `do {} while` loop from
`result` to `result > 0`.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25055#comment:20>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list