diff options
author | Kim Alvefur <zash@zash.se> | 2019-11-02 19:24:26 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-11-02 19:24:26 +0100 |
commit | ba431b5efc178fe2f479b6cfc8612d2af11e005c (patch) | |
tree | b491ea7660716e705aaf6443844e19e2e035d179 /net/resolvers/service.lua | |
parent | 9bd711b194dfc280f55bd7762eca8feac331f28c (diff) | |
download | prosody-ba431b5efc178fe2f479b6cfc8612d2af11e005c.tar.gz prosody-ba431b5efc178fe2f479b6cfc8612d2af11e005c.zip |
net.resolvers: Apply IDNA conversion to ascii for DNS lookups (fixes #1426)
Diffstat (limited to 'net/resolvers/service.lua')
-rw-r--r-- | net/resolvers/service.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/resolvers/service.lua b/net/resolvers/service.lua index b5a2d821..a76adb73 100644 --- a/net/resolvers/service.lua +++ b/net/resolvers/service.lua @@ -1,5 +1,6 @@ local adns = require "net.adns"; local basic = require "net.resolvers.basic"; +local idna_to_ascii = require "util.encodings".idna.to_ascii; local methods = {}; local resolver_mt = { __index = methods }; @@ -58,7 +59,7 @@ end local function new(hostname, service, conn_type, extra) return setmetatable({ - hostname = hostname; + hostname = idna_to_ascii(hostname); service = service; conn_type = conn_type or "tcp"; extra = extra; |