Software /
code /
prosody
Changeset
5947:49fb5835965e
Merge with trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 16 Dec 2013 02:05:16 +0000 |
parents | 5946:04f2138dfa87 (diff) 5942:b5e8843cfbeb (current diff) |
children | 5951:09645f58c14c |
files | |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/jid.lua Sat Dec 14 17:25:55 2013 +0100 +++ b/util/jid.lua Mon Dec 16 02:05:16 2013 +0000 @@ -8,7 +8,7 @@ -local match = string.match; +local match, sub = string.match, string.sub; local nodeprep = require "util.encodings".stringprep.nodeprep; local nameprep = require "util.encodings".stringprep.nameprep; local resourceprep = require "util.encodings".stringprep.resourceprep; @@ -47,6 +47,9 @@ local function _prepped_split(jid) local node, host, resource = _split(jid); if host then + if sub(host, -1, -1) == "." then -- Strip empty root label + host = sub(host, 1, -2); + end host = nameprep(host); if not host then return; end if node then