diff options
author | Kim Alvefur <zash@zash.se> | 2019-11-02 19:36:19 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-11-02 19:36:19 +0100 |
commit | 7ad5df7a4aa3ef7270081cf4ccf16a7a7f5aa5fa (patch) | |
tree | 81ebfd82214962d8cfe7a7d29ce656603b476c81 /net/resolvers/service.lua | |
parent | e064687531b7a2075579f3f6aff55328f90b9c1e (diff) | |
download | prosody-7ad5df7a4aa3ef7270081cf4ccf16a7a7f5aa5fa.tar.gz prosody-7ad5df7a4aa3ef7270081cf4ccf16a7a7f5aa5fa.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/service.lua')
-rw-r--r-- | net/resolvers/service.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/resolvers/service.lua b/net/resolvers/service.lua index a76adb73..bb255c33 100644 --- a/net/resolvers/service.lua +++ b/net/resolvers/service.lua @@ -25,6 +25,11 @@ function methods:next(cb) return; end + if not self.hostname then + -- FIXME report IDNA error + cb(nil); + end + local targets = {}; local function ready() self.targets = targets; |