# HG changeset patch # User Matthew Wild # Date 1387159456 0 # Node ID 51ead0aa3a0258f8587e3f920f10692138403b92 # Parent 31f14991070b838785246dc8cb5c997dbe66b5f4# Parent f3817912e8b2357332d46f374ae51e7bc81dc745 Merge 0.9->0.10 diff -r 31f14991070b -r 51ead0aa3a02 plugins/muc/mod_muc.lua diff -r 31f14991070b -r 51ead0aa3a02 util/jid.lua --- a/util/jid.lua Sat Dec 14 17:25:17 2013 +0100 +++ b/util/jid.lua Mon Dec 16 02:04: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