Changeset

3480:97831dfe7f72

util.jid: Fix parsing of JIDs with no nodepart and an @ in the resourcepart (thanks seth)
author Matthew Wild <mwild1@gmail.com>
date Tue, 31 Aug 2010 00:38:44 +0100
parents 3479:f68198c2f68f
children 3481:72d3c8029178
files util/jid.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/jid.lua	Tue Aug 31 00:28:49 2010 +0100
+++ b/util/jid.lua	Tue Aug 31 00:38:44 2010 +0100
@@ -17,7 +17,7 @@
 
 local function _split(jid)
 	if not jid then return; end
-	local node, nodepos = match(jid, "^([^@]+)@()");
+	local node, nodepos = match(jid, "^([^@/]+)@()");
 	local host, hostpos = match(jid, "^([^@/]+)()", nodepos)
 	if node and not host then return nil, nil, nil; end
 	local resource = match(jid, "^/(.+)$", hostpos);