summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/jabber.php2
-rwxr-xr-xxmppdaemon.php4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/jabber.php b/lib/jabber.php
index 7630d8cd2..2e136cd74 100644
--- a/lib/jabber.php
+++ b/lib/jabber.php
@@ -93,7 +93,7 @@ function jabber_confirm_address($code, $nickname, $address) {
'address bar of your browser). If that user isn\'t you, ' .
'or if you didn\'t request this confirmation, just ignore this message.';
- jabber_send_message($address, $body);
+ jabber_send_message($address, $body);
}
function jabber_special_presence($type, $to=NULL, $show=NULL, $status=NULL) {
diff --git a/xmppdaemon.php b/xmppdaemon.php
index cc464f155..afe248c8e 100755
--- a/xmppdaemon.php
+++ b/xmppdaemon.php
@@ -111,6 +111,10 @@ class XMPPDaemon {
if (strlen($pl['body']) == 0) {
return;
}
+
+ $from = jabber_normalize_jid($pl['from']);
+ $user = $this->get_user($from);
+
if (!$user) {
$this->log(LOG_WARNING, 'Message from unknown user ' . $from);
return;