diff options
author | steckbrief <steckbrief@chefmail.de> | 2018-10-14 12:52:17 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2018-10-14 12:52:17 +0200 |
commit | 840bd494f97effaede00d2bbda3d1503887f1f83 (patch) | |
tree | 2450dce2905db9c53eeaf3a4cc741a93a671471c /storage-backend/lib/xmpp.util.inc.php | |
parent | 35ad320c6926821423b6f84e4f914062f5410e39 (diff) |
fixes error in getJidDomain(JID) in case of a JID with resource identifier
Diffstat (limited to '')
-rw-r--r-- | storage-backend/lib/xmpp.util.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |