Software /
code /
prosody
Diff
net/resolvers/basic.lua @ 10384:94c9c574cd8a 0.11
net.resolvers: Apply IDNA conversion to ascii for DNS lookups (fixes #1426)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 02 Nov 2019 19:24:26 +0100 |
parent | 9496:4ac3103787cc |
child | 10385:62a7042e0771 |
line wrap: on
line diff
--- a/net/resolvers/basic.lua Sun Oct 20 20:52:14 2019 +0200 +++ b/net/resolvers/basic.lua Sat Nov 02 19:24:26 2019 +0100 @@ -1,5 +1,6 @@ local adns = require "net.adns"; local inet_pton = require "util.net".pton; +local idna_to_ascii = require "util.encodings".idna.to_ascii; local methods = {}; local resolver_mt = { __index = methods }; @@ -59,7 +60,7 @@ local function new(hostname, port, conn_type, extra) return setmetatable({ - hostname = hostname; + hostname = idna_to_ascii(hostname); port = port; conn_type = conn_type or "tcp"; extra = extra;