Open mathewhodson opened 2 years ago
The IsOnionV2Address function comments say, "The second-to-the-right most label is a 16 character long, base32." The code actually seems to check the left-most label.
IsOnionV2Address
Based on similar code in IsOnionV3Address, the code in IsOnionV2Address should be updated to this:
IsOnionV3Address
address := labels[len(labels)-2] if len(address) != 16 { return false } _, err := onionBase32Encoding.DecodeString(address)
_Originally posted by @mathewhodson in https://github.com/zmap/zlint/pull/677#discussion_r894899072_
The
IsOnionV2Address
function comments say, "The second-to-the-right most label is a 16 character long, base32." The code actually seems to check the left-most label.Based on similar code in
IsOnionV3Address
, the code inIsOnionV2Address
should be updated to this:_Originally posted by @mathewhodson in https://github.com/zmap/zlint/pull/677#discussion_r894899072_