e990ae3547d4841ddc9aa672811af0fb0d0ae11f
[citadel.git] / citadel / modules / xmpp / serv_xmpp.c
1 /*
2  * XMPP (Jabber) service for the Citadel system
3  * Copyright (c) 2007-2011 by Art Cancro
4  *
5  * This program is open source software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  */
19
20 #include "sysdep.h"
21 #include <stdlib.h>
22 #include <unistd.h>
23 #include <stdio.h>
24 #include <fcntl.h>
25 #include <signal.h>
26 #include <pwd.h>
27 #include <errno.h>
28 #include <sys/types.h>
29
30 #if TIME_WITH_SYS_TIME
31 # include <sys/time.h>
32 # include <time.h>
33 #else
34 # if HAVE_SYS_TIME_H
35 #  include <sys/time.h>
36 # else
37 #  include <time.h>
38 # endif
39 #endif
40
41 #include <sys/wait.h>
42 #include <string.h>
43 #include <limits.h>
44 #include <ctype.h>
45 #include <libcitadel.h>
46 #include <expat.h>
47 #include "citadel.h"
48 #include "server.h"
49 #include "citserver.h"
50 #include "support.h"
51 #include "config.h"
52 #include "user_ops.h"
53 #include "database.h"
54 #include "msgbase.h"
55 #include "internet_addressing.h"
56 #include "md5.h"
57 #include "ctdl_module.h"
58 #include "serv_xmpp.h"
59
60 /* XML_StopParser is present in expat 2.x */
61 #if XML_MAJOR_VERSION > 1
62 #define HAVE_XML_STOPPARSER
63 #endif
64
65 struct xmpp_event *xmpp_queue = NULL;
66
67 int XMPPSrvDebugEnable = 0;
68
69
70
71 #ifdef HAVE_XML_STOPPARSER
72 /* Stop the parser if an entity declaration is hit. */
73 static void xmpp_entity_declaration(void *userData, const XML_Char *entityName,
74                                 int is_parameter_entity, const XML_Char *value,
75                                 int value_length, const XML_Char *base,
76                                 const XML_Char *systemId, const XML_Char *publicId,
77                                 const XML_Char *notationName
78 ) {
79         XMPPM_syslog(LOG_WARNING, "Illegal entity declaration encountered; stopping parser.");
80         XML_StopParser(XMPP->xp, XML_FALSE);
81 }
82 #endif
83
84
85
86 /*
87  * Given a source string and a target buffer, returns the string
88  * properly escaped for insertion into an XML stream.  Returns a
89  * pointer to the target buffer for convenience.
90  *
91  * BUG: this does not properly handle UTF-8
92  */
93 char *xmlesc(char *buf, char *str, int bufsiz)
94 {
95         char *ptr;
96         unsigned char ch;
97         int len = 0;
98
99         if (!buf) return(NULL);
100         buf[0] = 0;
101         len = 0;
102         if (!str) {
103                 return(buf);
104         }
105
106         for (ptr=str; *ptr; ptr++) {
107                 ch = *ptr;
108                 if (ch == '<') {
109                         strcpy(&buf[len], "&lt;");
110                         len += 4;
111                 }
112                 else if (ch == '>') {
113                         strcpy(&buf[len], "&gt;");
114                         len += 4;
115                 }
116                 else if (ch == '&') {
117                         strcpy(&buf[len], "&amp;");
118                         len += 5;
119                 }
120                 else if ((ch >= 0x20) && (ch <= 0x7F)) {
121                         buf[len++] = ch;
122                         buf[len] = 0;
123                 }
124                 else if (ch < 0x20) {
125                         /* we probably shouldn't be doing this */
126                         buf[len++] = '_';
127                         buf[len] = 0;
128                 }
129                 else {
130                         char oct[10];
131                         sprintf(oct, "&#%o;", ch);
132                         strcpy(&buf[len], oct);
133                         len += strlen(oct);
134                 }
135                 if ((len + 6) > bufsiz) {
136                         return(buf);
137                 }
138         }
139         return(buf);
140 }
141
142
143 /*
144  * We have just received a <stream> tag from the client, so send them ours
145  */
146 void xmpp_stream_start(void *data, const char *supplied_el, const char **attr)
147 {
148         char xmlbuf[256];
149
150         while (*attr) {
151                 if (!strcasecmp(attr[0], "to")) {
152                         safestrncpy(XMPP->server_name, attr[1], sizeof XMPP->server_name);
153                 }
154                 attr += 2;
155         }
156
157         cprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
158
159         cprintf("<stream:stream ");
160         cprintf("from=\"%s\" ", xmlesc(xmlbuf, XMPP->server_name, sizeof xmlbuf));
161         cprintf("id=\"%08x\" ", CC->cs_pid);
162         cprintf("version=\"1.0\" ");
163         cprintf("xmlns:stream=\"http://etherx.jabber.org/streams\" ");
164         cprintf("xmlns=\"jabber:client\">");
165
166         /* The features of this stream are... */
167         cprintf("<stream:features>");
168
169         /*
170          * TLS encryption (but only if it isn't already active)
171          */ 
172 #ifdef HAVE_OPENSSL
173         if (!CC->redirect_ssl) {
174                 cprintf("<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'></starttls>");
175         }
176 #endif
177
178         if (!CC->logged_in) {
179                 /* If we're not logged in yet, offer SASL as our feature set */
180                 xmpp_output_auth_mechs();
181
182                 /* Also offer non-SASL authentication */
183                 cprintf("<auth xmlns=\"http://jabber.org/features/iq-auth\"/>");
184         }
185
186         /* Offer binding and sessions as part of our feature set */
187         cprintf("<bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\"/>");
188         cprintf("<session xmlns=\"urn:ietf:params:xml:ns:xmpp-session\"/>");
189
190         cprintf("</stream:features>");
191
192         CC->is_async = 1;               /* XMPP sessions are inherently async-capable */
193 }
194
195
196 void xmpp_xml_start(void *data, const char *supplied_el, const char **attr) {
197         char el[256];
198         char *sep = NULL;
199         int i;
200
201         /* Axe the namespace, we don't care about it */
202         safestrncpy(el, supplied_el, sizeof el);
203         while (sep = strchr(el, ':'), sep) {
204                 strcpy(el, ++sep);
205         }
206
207         /*
208         XMPP_syslog(LOG_DEBUG, "XMPP ELEMENT START: <%s>\n", el);
209         for (i=0; attr[i] != NULL; i+=2) {
210                 XMPP_syslog(LOG_DEBUG, "                    Attribute '%s' = '%s'\n", attr[i], attr[i+1]);
211         }
212         uncomment for more verbosity */
213
214         if (!strcasecmp(el, "stream")) {
215                 xmpp_stream_start(data, supplied_el, attr);
216         }
217
218         else if (!strcasecmp(el, "query")) {
219                 XMPP->iq_query_xmlns[0] = 0;
220                 safestrncpy(XMPP->iq_query_xmlns, supplied_el, sizeof XMPP->iq_query_xmlns);
221         }
222
223         else if (!strcasecmp(el, "bind")) {
224                 XMPP->bind_requested = 1;
225         }
226
227         else if (!strcasecmp(el, "iq")) {
228                 for (i=0; attr[i] != NULL; i+=2) {
229                         if (!strcasecmp(attr[i], "type")) {
230                                 safestrncpy(XMPP->iq_type, attr[i+1], sizeof XMPP->iq_type);
231                         }
232                         else if (!strcasecmp(attr[i], "id")) {
233                                 safestrncpy(XMPP->iq_id, attr[i+1], sizeof XMPP->iq_id);
234                         }
235                         else if (!strcasecmp(attr[i], "from")) {
236                                 safestrncpy(XMPP->iq_from, attr[i+1], sizeof XMPP->iq_from);
237                         }
238                         else if (!strcasecmp(attr[i], "to")) {
239                                 safestrncpy(XMPP->iq_to, attr[i+1], sizeof XMPP->iq_to);
240                         }
241                 }
242         }
243
244         else if (!strcasecmp(el, "auth")) {
245                 XMPP->sasl_auth_mech[0] = 0;
246                 for (i=0; attr[i] != NULL; i+=2) {
247                         if (!strcasecmp(attr[i], "mechanism")) {
248                                 safestrncpy(XMPP->sasl_auth_mech, attr[i+1], sizeof XMPP->sasl_auth_mech);
249                         }
250                 }
251         }
252
253         else if (!strcasecmp(el, "message")) {
254                 for (i=0; attr[i] != NULL; i+=2) {
255                         if (!strcasecmp(attr[i], "to")) {
256                                 safestrncpy(XMPP->message_to, attr[i+1], sizeof XMPP->message_to);
257                         }
258                 }
259         }
260
261         else if (!strcasecmp(el, "html")) {
262                 ++XMPP->html_tag_level;
263         }
264 }
265
266
267
268 void xmpp_xml_end(void *data, const char *supplied_el) {
269         char el[256];
270         char *sep = NULL;
271         char xmlbuf[256];
272
273         /* Axe the namespace, we don't care about it */
274         safestrncpy(el, supplied_el, sizeof el);
275         while (sep = strchr(el, ':'), sep) {
276                 strcpy(el, ++sep);
277         }
278
279         /*
280         XMPP_syslog(LOG_DEBUG, "XMPP ELEMENT END  : <%s>\n", el);
281         if (XMPP->chardata_len > 0) {
282                 XMPP_syslog(LOG_DEBUG, "          chardata: %s\n", XMPP->chardata);
283         }
284         uncomment for more verbosity */
285
286         if (!strcasecmp(el, "resource")) {
287                 if (XMPP->chardata_len > 0) {
288                         safestrncpy(XMPP->iq_client_resource, XMPP->chardata,
289                                 sizeof XMPP->iq_client_resource);
290                         striplt(XMPP->iq_client_resource);
291                 }
292         }
293
294         else if (!strcasecmp(el, "username")) {         /* NON SASL ONLY */
295                 if (XMPP->chardata_len > 0) {
296                         safestrncpy(XMPP->iq_client_username, XMPP->chardata,
297                                 sizeof XMPP->iq_client_username);
298                         striplt(XMPP->iq_client_username);
299                 }
300         }
301
302         else if (!strcasecmp(el, "password")) {         /* NON SASL ONLY */
303                 if (XMPP->chardata_len > 0) {
304                         safestrncpy(XMPP->iq_client_password, XMPP->chardata,
305                                 sizeof XMPP->iq_client_password);
306                         striplt(XMPP->iq_client_password);
307                 }
308         }
309
310         else if (!strcasecmp(el, "iq")) {
311
312                 /*
313                  * iq type="get" (handle queries)
314                  */
315                 if (!strcasecmp(XMPP->iq_type, "get")) {
316
317                         /*
318                          * Query on a namespace
319                          */
320                         if (!IsEmptyStr(XMPP->iq_query_xmlns)) {
321                                 xmpp_query_namespace(XMPP->iq_id, XMPP->iq_from,
322                                                 XMPP->iq_to, XMPP->iq_query_xmlns);
323                         }
324
325                         /*
326                          * ping ( http://xmpp.org/extensions/xep-0199.html )
327                          */
328                         else if (XMPP->ping_requested) {
329                                 cprintf("<iq type=\"result\" ");
330                                 if (!IsEmptyStr(XMPP->iq_from)) {
331                                         cprintf("to=\"%s\" ", xmlesc(xmlbuf, XMPP->iq_from, sizeof xmlbuf));
332                                 }
333                                 if (!IsEmptyStr(XMPP->iq_to)) {
334                                         cprintf("from=\"%s\" ", xmlesc(xmlbuf, XMPP->iq_to, sizeof xmlbuf));
335                                 }
336                                 cprintf("id=\"%s\"/>", xmlesc(xmlbuf, XMPP->iq_id, sizeof xmlbuf));
337                         }
338
339                         /*
340                          * Unknown query ... return the XML equivalent of a blank stare
341                          */
342                         else {
343                                 XMPP_syslog(LOG_DEBUG,
344                                             "Unknown query <%s> - returning <service-unavailable/>\n",
345                                             el
346                                 );
347                                 cprintf("<iq type=\"error\" id=\"%s\">", xmlesc(xmlbuf, XMPP->iq_id, sizeof xmlbuf));
348                                 cprintf("<error code=\"503\" type=\"cancel\">"
349                                         "<service-unavailable xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"/>"
350                                         "</error>"
351                                 );
352                                 cprintf("</iq>");
353                         }
354                 }
355
356                 /*
357                  * Non SASL authentication
358                  */
359                 else if (
360                         (!strcasecmp(XMPP->iq_type, "set"))
361                         && (!strcasecmp(XMPP->iq_query_xmlns, "jabber:iq:auth:query"))
362                         ) {
363
364                         xmpp_non_sasl_authenticate(
365                                 XMPP->iq_id,
366                                 XMPP->iq_client_username,
367                                 XMPP->iq_client_password,
368                                 XMPP->iq_client_resource
369                         );
370                 }       
371
372                 /*
373                  * If this <iq> stanza was a "bind" attempt, process it ...
374                  */
375                 else if (
376                         (XMPP->bind_requested)
377                         && (!IsEmptyStr(XMPP->iq_id))
378                         && (!IsEmptyStr(XMPP->iq_client_resource))
379                         && (CC->logged_in)
380                         ) {
381
382                         /* Generate the "full JID" of the client resource */
383
384                         snprintf(XMPP->client_jid, sizeof XMPP->client_jid,
385                                 "%s/%s",
386                                 CC->cs_inet_email,
387                                 XMPP->iq_client_resource
388                         );
389
390                         /* Tell the client what its JID is */
391
392                         cprintf("<iq type=\"result\" id=\"%s\">", xmlesc(xmlbuf, XMPP->iq_id, sizeof xmlbuf));
393                         cprintf("<bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\">");
394                         cprintf("<jid>%s</jid>", xmlesc(xmlbuf, XMPP->client_jid, sizeof xmlbuf));
395                         cprintf("</bind>");
396                         cprintf("</iq>");
397                 }
398
399                 else if (XMPP->iq_session) {
400                         cprintf("<iq type=\"result\" id=\"%s\">", xmlesc(xmlbuf, XMPP->iq_id, sizeof xmlbuf));
401                         cprintf("</iq>");
402                 }
403
404                 else {
405                         cprintf("<iq type=\"error\" id=\"%s\">", xmlesc(xmlbuf, XMPP->iq_id, sizeof xmlbuf));
406                         cprintf("<error>Don't know howto do '%s'!</error>", xmlesc(xmlbuf, XMPP->iq_type, sizeof xmlbuf));
407                         cprintf("</iq>");
408                 }
409
410                 /* Now clear these fields out so they don't get used by a future stanza */
411                 XMPP->iq_id[0] = 0;
412                 XMPP->iq_from[0] = 0;
413                 XMPP->iq_to[0] = 0;
414                 XMPP->iq_type[0] = 0;
415                 XMPP->iq_client_resource[0] = 0;
416                 XMPP->iq_session = 0;
417                 XMPP->iq_query_xmlns[0] = 0;
418                 XMPP->bind_requested = 0;
419                 XMPP->ping_requested = 0;
420         }
421
422         else if (!strcasecmp(el, "auth")) {
423
424                 /* Try to authenticate (this function is responsible for the output stanza) */
425                 xmpp_sasl_auth(XMPP->sasl_auth_mech, (XMPP->chardata != NULL ? XMPP->chardata : "") );
426
427                 /* Now clear these fields out so they don't get used by a future stanza */
428                 XMPP->sasl_auth_mech[0] = 0;
429         }
430
431         else if (!strcasecmp(el, "session")) {
432                 XMPP->iq_session = 1;
433         }
434
435         else if (!strcasecmp(el, "presence")) {
436
437                 /* Respond to a <presence> update by firing back with presence information
438                  * on the entire wholist.  Check this assumption, it's probably wrong.
439                  */
440                 xmpp_wholist_presence_dump();
441         }
442
443         else if ( (!strcasecmp(el, "body")) && (XMPP->html_tag_level == 0) ) {
444                 if (XMPP->message_body != NULL) {
445                         free(XMPP->message_body);
446                         XMPP->message_body = NULL;
447                 }
448                 if (XMPP->chardata_len > 0) {
449                         XMPP->message_body = strdup(XMPP->chardata);
450                 }
451         }
452
453         else if (!strcasecmp(el, "message")) {
454                 xmpp_send_message(XMPP->message_to, XMPP->message_body);
455                 XMPP->html_tag_level = 0;
456         }
457
458         else if (!strcasecmp(el, "html")) {
459                 --XMPP->html_tag_level;
460         }
461
462         else if (!strcasecmp(el, "starttls")) {
463 #ifdef HAVE_OPENSSL
464                 cprintf("<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
465                 CtdlModuleStartCryptoMsgs(NULL, NULL, NULL);
466                 if (!CC->redirect_ssl) CC->kill_me = KILLME_NO_CRYPTO;
467 #else
468                 cprintf("<failure xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
469                 CC->kill_me = KILLME_NO_CRYPTO;
470 #endif
471         }
472
473         else if (!strcasecmp(el, "ping")) {
474                 XMPP->ping_requested = 1;
475         }
476
477         else if (!strcasecmp(el, "stream")) {
478                 XMPPM_syslog(LOG_DEBUG, "XMPP client shut down their stream\n");
479                 xmpp_massacre_roster();
480                 cprintf("</stream>\n");
481                 CC->kill_me = KILLME_CLIENT_LOGGED_OUT;
482         }
483
484         else if (!strcasecmp(el, "query")) {
485                 /* already processed , no further action needed here */
486         }
487
488         else if (!strcasecmp(el, "bind")) {
489                 /* already processed , no further action needed here */
490         }
491
492         else {
493                 XMPP_syslog(LOG_DEBUG, "Ignoring unknown tag <%s>\n", el);
494         }
495
496         XMPP->chardata_len = 0;
497         if (XMPP->chardata_alloc > 0) {
498                 XMPP->chardata[0] = 0;
499         }
500 }
501
502
503 void xmpp_xml_chardata(void *data, const XML_Char *s, int len)
504 {
505         citxmpp *X = XMPP;
506
507         if (X->chardata_alloc == 0) {
508                 X->chardata_alloc = SIZ;
509                 X->chardata = malloc(X->chardata_alloc);
510         }
511         if ((X->chardata_len + len + 1) > X->chardata_alloc) {
512                 X->chardata_alloc = X->chardata_len + len + 1024;
513                 X->chardata = realloc(X->chardata, X->chardata_alloc);
514         }
515         memcpy(&X->chardata[X->chardata_len], s, len);
516         X->chardata_len += len;
517         X->chardata[X->chardata_len] = 0;
518 }
519
520
521 /*
522  * This cleanup function blows away the temporary memory and files used by the XMPP service.
523  */
524 void xmpp_cleanup_function(void) {
525
526         /* Don't do this stuff if this is not a XMPP session! */
527         if (CC->h_command_function != xmpp_command_loop) return;
528
529         if (XMPP->chardata != NULL) {
530                 free(XMPP->chardata);
531                 XMPP->chardata = NULL;
532                 XMPP->chardata_len = 0;
533                 XMPP->chardata_alloc = 0;
534                 if (XMPP->message_body != NULL) {
535                         free(XMPP->message_body);
536                 }
537         }
538         XML_ParserFree(XMPP->xp);
539         free(XMPP);
540 }
541
542
543
544 /*
545  * Here's where our XMPP session begins its happy day.
546  */
547 void xmpp_greeting(void) {
548         client_set_inbound_buf(4);
549         strcpy(CC->cs_clientname, "XMPP session");
550         CC->session_specific_data = malloc(sizeof(citxmpp));
551         memset(XMPP, 0, sizeof(citxmpp));
552         XMPP->last_event_processed = queue_event_seq;
553
554         /* XMPP does not use a greeting, but we still have to initialize some things. */
555
556         XMPP->xp = XML_ParserCreateNS("UTF-8", ':');
557         if (XMPP->xp == NULL) {
558                 XMPPM_syslog(LOG_ALERT, "Cannot create XML parser!\n");
559                 CC->kill_me = KILLME_XML_PARSER;
560                 return;
561         }
562
563         XML_SetElementHandler(XMPP->xp, xmpp_xml_start, xmpp_xml_end);
564         XML_SetCharacterDataHandler(XMPP->xp, xmpp_xml_chardata);
565         // XML_SetUserData(XMPP->xp, something...);
566
567         /* Prevent the "billion laughs" attack against expat by disabling
568          * internal entity expansion.  With 2.x, forcibly stop the parser
569          * if an entity is declared - this is safer and a more obvious
570          * failure mode.  With older versions, simply prevent expansion
571          * of such entities. */
572 #ifdef HAVE_XML_STOPPARSER
573         XML_SetEntityDeclHandler(XMPP->xp, xmpp_entity_declaration);
574 #else
575         XML_SetDefaultHandler(XMPP->xp, NULL);
576 #endif
577
578         CC->can_receive_im = 1;         /* This protocol is capable of receiving instant messages */
579 }
580
581
582 /* 
583  * Main command loop for XMPP sessions.
584  */
585 void xmpp_command_loop(void) {
586         int rc;
587         StrBuf *stream_input = NewStrBuf();
588
589         time(&CC->lastcmd);
590         rc = client_read_random_blob(stream_input, 30);
591         if (rc > 0) {
592                 XML_Parse(XMPP->xp, ChrPtr(stream_input), rc, 0);
593         }
594         else {
595                 XMPPM_syslog(LOG_ERR, "client disconnected: ending session.\n");
596                 CC->kill_me = KILLME_CLIENT_DISCONNECTED;
597         }
598         FreeStrBuf(&stream_input);
599 }
600
601
602 /*
603  * Async loop for XMPP sessions (handles the transmission of unsolicited stanzas)
604  */
605 void xmpp_async_loop(void) {
606         xmpp_process_events();
607         xmpp_output_incoming_messages();
608 }
609
610
611 /*
612  * Login hook for XMPP sessions
613  */
614 void xmpp_login_hook(void) {
615         xmpp_queue_event(XMPP_EVT_LOGIN, CC->cs_inet_email);
616 }
617
618
619 /*
620  * Logout hook for XMPP sessions
621  */
622 void xmpp_logout_hook(void) {
623         xmpp_queue_event(XMPP_EVT_LOGOUT, CC->cs_inet_email);
624 }
625
626
627 void LogXMPPSrvDebugEnable(const int n)
628 {
629         XMPPSrvDebugEnable = n;
630 }
631 const char *CitadelServiceXMPP="XMPP";
632 extern void xmpp_cleanup_events(void);
633 CTDL_MODULE_INIT(xmpp)
634 {
635         if (!threading) {
636                 CtdlRegisterServiceHook(config.c_xmpp_c2s_port,
637                                         NULL,
638                                         xmpp_greeting,
639                                         xmpp_command_loop,
640                                         xmpp_async_loop,
641                                         CitadelServiceXMPP
642                 );
643                 CtdlRegisterDebugFlagHook(HKEY("serv_xmpp"), LogXMPPSrvDebugEnable, &XMPPSrvDebugEnable);
644                 CtdlRegisterSessionHook(xmpp_cleanup_function, EVT_STOP, PRIO_STOP + 70);
645                 CtdlRegisterSessionHook(xmpp_login_hook, EVT_LOGIN, PRIO_LOGIN + 90);
646                 CtdlRegisterSessionHook(xmpp_logout_hook, EVT_LOGOUT, PRIO_LOGOUT + 90);
647                 CtdlRegisterSessionHook(xmpp_login_hook, EVT_UNSTEALTH, PRIO_UNSTEALTH + 1);
648                 CtdlRegisterSessionHook(xmpp_logout_hook, EVT_STEALTH, PRIO_STEALTH + 1);
649                 CtdlRegisterCleanupHook(xmpp_cleanup_events);
650
651         }
652
653         /* return our module name for the log */
654         return "xmpp";
655 }