Software /
code /
prosody
Comparison
net/resolvers/basic.lua @ 10385:62a7042e0771 0.11
net.resolvers: Abort on hostnames not passing IDNA validation
Prevents error on trying to use nil.
Needs better error reporting in the future.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 02 Nov 2019 19:36:19 +0100 |
parent | 10384:94c9c574cd8a |
child | 10386:cf93a951da37 |
child | 10400:4c2d789a106b |
comparison
equal
deleted
inserted
replaced
10384:94c9c574cd8a | 10385:62a7042e0771 |
---|---|
14 return; | 14 return; |
15 end | 15 end |
16 local next_target = table.remove(self.targets, 1); | 16 local next_target = table.remove(self.targets, 1); |
17 cb(unpack(next_target, 1, 4)); | 17 cb(unpack(next_target, 1, 4)); |
18 return; | 18 return; |
19 end | |
20 | |
21 if not self.hostname then | |
22 -- FIXME report IDNA error | |
23 cb(nil); | |
19 end | 24 end |
20 | 25 |
21 local targets = {}; | 26 local targets = {}; |
22 local n = 2; | 27 local n = 2; |
23 local function ready() | 28 local function ready() |