Philipp Hörist pushed to branch master at gajim / gajim


Commits:
a72b39b1 by André Apitzsch at 2021-03-13T08:06:46+01:00
Only convert domain name to ASCII

IDNA is about domain name only, so ignore username, password and port.

Fixes #10010.

- - - - -


1 changed file:

- gajim/common/helpers.py


Changes:

=====================================
gajim/common/helpers.py
=====================================
@@ -140,11 +140,11 @@ def puny_encode_url(url):
         _url = '//' + _url
     try:
         o = urllib.parse.urlparse(_url)
-        p_loc = idn_to_ascii(o.netloc)
+        p_loc = idn_to_ascii(o.hostname)
     except Exception:
         log.debug('urlparse failed: %s', url)
         return False
-    return url.replace(o.netloc, p_loc)
+    return url.replace(o.hostname, p_loc)
 
 def parse_resource(resource):
     """



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/a72b39b1ec120945f187c6cd660a84dfc2a282ac

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/a72b39b1ec120945f187c6cd660a84dfc2a282ac
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to