Skip to content
  • David Goulet's avatar
    hs-v3: Set extended error if .onion is invalid · 80f24190
    David Goulet authored
    
    
    In order to achieve this, the parse_extended_hostname() had to be refactored
    to return either success or failure and setting the hostname type in the given
    parameter.
    
    The reason for that is so it can detect invalid onion addresses that is having
    a ".onion", the right length but just not passing validation.
    
    That way, we can send back the prop304 ExtendedError "X'F1' Onion Service
    Descriptor Is Invalid" to notify the SOCKS connection of the invalid onion
    address.
    
    Part of #30382
    
    Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
    80f24190