From 840bd494f97effaede00d2bbda3d1503887f1f83 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Sun, 14 Oct 2018 12:52:17 +0200 Subject: fixes error in getJidDomain(JID) in case of a JID with resource identifier --- storage-backend/lib/xmpp.util.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage-backend/lib/xmpp.util.inc.php b/storage-backend/lib/xmpp.util.inc.php index cdc90fb..eaf65fd 100644 --- a/storage-backend/lib/xmpp.util.inc.php +++ b/storage-backend/lib/xmpp.util.inc.php @@ -13,7 +13,7 @@ function getJidDomain($jid) { if ($slashIndex !== false) { if ($slashIndex > $atIndex) {// 'local@domain.foo/resource' and 'local@domain.foo/res@otherres' case - return substr($jid, $atIndex + 1, $slashIndex - $atIndex + 1); + return substr($jid, $atIndex + 1, $slashIndex - $atIndex - 1); } else {// 'domain.foo/res@otherres' case return substr($jid, 0, $slashIndex); } -- cgit v1.2.3