Philipp Hörist pushed to branch master at gajim / python-nbxmpp

Commits:

1 changed file:

Changes:

  • nbxmpp/protocol.py
    ... ... @@ -717,8 +717,9 @@ def validate_domainpart(domainpart):
    717 717
         if not domainpart:
    
    718 718
             raise DomainpartByteLimit
    
    719 719
     
    
    720
    -    if GLib.hostname_is_ip_address(domainpart):
    
    721
    -        return domainpart
    
    720
    +    ip_address = domainpart.strip('[]')
    
    721
    +    if GLib.hostname_is_ip_address(ip_address):
    
    722
    +        return ip_address
    
    722 723
     
    
    723 724
         if domainpart.endswith('.'):  # RFC7622, 3.2
    
    724 725
             domainpart = domainpart[:-1]