Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
-
47daf6a9
by lovetox at 2020-08-16T22:20:35+02:00
1 changed file:
Changes:
| ... | ... | @@ -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]
|