aboutsummaryrefslogtreecommitdiffstats
path: root/util/jid.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-11-23 23:12:01 +0100
committerKim Alvefur <zash@zash.se>2019-11-23 23:12:01 +0100
commitb10f203c51313b88a5c1a0ef8b1fa96aab7fac48 (patch)
tree1a5b57117c8c88f05ebb8b67a0d2848988b7620c /util/jid.lua
parent6a5c40e1cac89398fa56b15459ba3f1777889d85 (diff)
parent1421714628a9f35f20e4154e031f49c70fd29672 (diff)
downloadprosody-b10f203c51313b88a5c1a0ef8b1fa96aab7fac48.tar.gz
prosody-b10f203c51313b88a5c1a0ef8b1fa96aab7fac48.zip
Merge 0.11->trunk
Diffstat (limited to 'util/jid.lua')
-rw-r--r--util/jid.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/util/jid.lua b/util/jid.lua
index ec31f180..1ddf33d4 100644
--- a/util/jid.lua
+++ b/util/jid.lua
@@ -45,20 +45,20 @@ local function bare(jid)
return host;
end
-local function prepped_split(jid)
+local function prepped_split(jid, strict)
local node, host, resource = split(jid);
if host and host ~= "." then
if sub(host, -1, -1) == "." then -- Strip empty root label
host = sub(host, 1, -2);
end
- host = nameprep(host);
+ host = nameprep(host, strict);
if not host then return; end
if node then
- node = nodeprep(node);
+ node = nodeprep(node, strict);
if not node then return; end
end
if resource then
- resource = resourceprep(resource);
+ resource = resourceprep(resource, strict);
if not resource then return; end
end
return node, host, resource;
@@ -77,8 +77,8 @@ local function join(node, host, resource)
return host;
end
-local function prep(jid)
- local node, host, resource = prepped_split(jid);
+local function prep(jid, strict)
+ local node, host, resource = prepped_split(jid, strict);
return join(node, host, resource);
end