aboutsummaryrefslogtreecommitdiffstats
path: root/net/resolvers/basic.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-11-02 19:36:19 +0100
committerKim Alvefur <zash@zash.se>2019-11-02 19:36:19 +0100
commit9c2a74d09c9c45d165a4bcf51f4debfac8877e36 (patch)
tree81ebfd82214962d8cfe7a7d29ce656603b476c81 /net/resolvers/basic.lua
parentba431b5efc178fe2f479b6cfc8612d2af11e005c (diff)
downloadprosody-9c2a74d09c9c45d165a4bcf51f4debfac8877e36.tar.gz
prosody-9c2a74d09c9c45d165a4bcf51f4debfac8877e36.zip
net.resolvers: Abort on hostnames not passing IDNA validation
Prevents error on trying to use nil. Needs better error reporting in the future.
Diffstat (limited to 'net/resolvers/basic.lua')
-rw-r--r--net/resolvers/basic.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/resolvers/basic.lua b/net/resolvers/basic.lua
index d8031a6b..cafef58b 100644
--- a/net/resolvers/basic.lua
+++ b/net/resolvers/basic.lua
@@ -18,6 +18,11 @@ function methods:next(cb)
return;
end
+ if not self.hostname then
+ -- FIXME report IDNA error
+ cb(nil);
+ end
+
local targets = {};
local n = 2;
local function ready()