Skip to content

Commit 3774227

Browse files
caleb tucker-raymondcaleb tucker-raymond
caleb tucker-raymond
authored and
caleb tucker-raymond
committed
allow / and @ characters in jid resource
1 parent 8b389da commit 3774227

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xmpp/xmpp_jid.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ class XMPPJid {
5151
public $bare = null;
5252

5353
public function __construct($str) {
54-
$tmp = explode("@", $str);
54+
$tmp = explode("@", $str, 2);
5555
if(sizeof($tmp) == 2) {
5656
$this->node = $tmp[0];
57-
$tmp = explode("/", $tmp[1]);
57+
$tmp = explode("/", $tmp[1], 2);
5858
if(sizeof($tmp) == 2) {
5959
$this->domain = $tmp[0];
6060
$this->resource = $tmp[1];

0 commit comments

Comments
 (0)