aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber
Commit message (Collapse)AuthorAgeLines
...
* jabber: Fix incoming google talk typing notificationsdequis2015-10-21-1/+5
| | | | | | | | | | | | | | | | | | | | | | | jabber_buddy_by_jid() does the following: head = g_hash_table_lookup(jd->buddies, jid); bud = (head && head->next) ? head->next : head; 'head' has the one without resource, 'bud' has the first resource. So if a resource is available, it uses it and ignores the head. When asked for a bare JID (with no resource) and GET_BUDDY_EXACT, it shouldn't do this, but it should return the head. In other words, the problem was a message in this format: <message from="username@gmail.com" ...> Instead of <message from="username@gmail.com/resource" ...> This only deals with incoming typing notifications. See next commit.
* jabber: Fix leak in jabber_gmail_handle_newdequis2015-10-08-2/+2
| | | | | | | From coverity. That g_strdup_printf() was really pointless, slightly ashamed we didn't notice that in the review of the patch.
* jabber: fix null handling with MUC topicsdequis2015-10-08-1/+2
| | | | From coverity.
* jabber: Improvements to the MUC part reason handlingdequis2015-08-26-15/+26
| | | | | | | - Look for a status message right inside <presence> (seen with ejabberd as a result of a s2s connection error) - Check status codes in a while loop, skipping unknown ones (such as 110, which means "Inform user that presence refers to itself")
* jabber/io: Split input buffer parsing to a jabber_feed_input() functiondequis2015-08-26-51/+71
| | | | | | | | | | | To simplify testing. Also allow passing a -1 as size to use strlen() Minor behavior change: The jabber_init_iq_auth() branch can no longer return immediately, which means it will continue through the ssl_pending() check in jabber_read_callback(). Other than that, the size -1 change, and one indentation level less, the function body is the same as before.
* jabber_logout: avoid null jd->buddies warnings in jabber_buddy_remove_alldequis2015-08-08-1/+3
|
* jabber: Show MUC kick/ban/leave reasonsdequis2015-08-08-2/+34
|
* typofix - https://github.com/vlajos/misspell_fixerVeres Lajos2015-08-07-5/+5
|
* Only try DIGEST-MD5 if there's no SSL/TLS or if PLAIN isn't supporteddequis2015-07-30-1/+5
| | | | | | | Which in practice means "don't bother with DIGEST-MD5 most of the time". It's weak, pointless over TLS, and often breaks with some servers (hi openfire)
* jabber: Add SASL ANONYMOUS support (XEP-0175)dequis2015-07-04-3/+18
| | | | Use "account jabber set anonymous on" to have bitlbee try that method
* jabber/s5bytestream: add G_GNUC_PRINTF to jabber_bs_abortdequis2015-06-28-1/+1
|
* Rename mail notification related settings for consistencydequis2015-05-28-7/+9
| | | | | - GMail notifications stuff is now just 'mail_notifications' - sed -i s/notify_handle/mail_notifications_handle/
* imcb_notify_email: change parameters to take a format stringdequis2015-05-28-5/+1
| | | | | | | Saves some messing with g_strdup_printf for the callers, and flags/sent_at weren't used anyway. Also check if the mail_notifications setting is enabled
* Simplify display of gmail notificationsdequis2015-05-28-18/+16
| | | | | | | | - Add gmail_notifications_limit hidden setting, set to 5 by default. - Don't show "snippets" in email notifications. Not very useful and they make the whole thing seem too spammy - Show sender name instead of your own email - Default values for empty subject / sender
* Gmail notifications support through new imcb_notify_email() APIArtem Savkov2015-05-28-0/+151
|
* jabber: Refactor conference message handlingdequis2015-05-28-55/+82
| | | | | | | | - Improve handling of "unknown 'from'" - Try a bit harder to detect the source of the message, and fall back to messages sent from a fake temporary user. - Fix receiving topic when it was set by someone who left the room. - Add jabber_get_bare_jid() utility function
* Lowering xmpp presence priority on away.Artem Savkov2015-05-28-1/+19
| | | | | When user set's away lower xmpp presence priority by 5 as most clients do, new priority won't go below zero though.
* More coverity fixes!dequis2015-05-07-1/+1
| | | | | | | | | | CID 18634: 'Logically dead code' in jabber_get_info CID 18638: 'Dereference after null check' in oauth2_access_token_done CID 18691: 'Copy into fixed size buffer' in bee_irc_user_new CID 20274: Leak in bee_irc_chat_invite CID 20297, CID 20283: Leaks in crypt_main Some the base64 leaks there weren't detected, needs modeling.
* hipchat: Basic implementation: Auth, profile and mention namesdequis2015-04-28-11/+148
| | | | | | | | This is enough to log in with their usernames, make 'chat add' based groupchat joins slightly more smooth, and see mention names as nicks. All the MUC list stuff is left out intentionally since that's not as stable as I wish.
* jabber: Register "hipchat" protocol (only minimal support for now)dequis2015-04-21-2/+17
| | | | | | | | | | | | | | | | | | | Another take on the subprotocols idea that, IMO, was a failure. Unlike the other implementation, this one doesn't touch gtalk/facebook accounts, it just adds another copy of the "jabber" prpl called "hipchat". And, based on the protocol name: - sets JFLAG_HIPCHAT to jabber_data - sets the default value of the "server" setting - only includes the oauth setting for jabber-type accounts This is slightly more "hardcoded" but honestly facebook and gtalk are just as hardcoded as this. Copying the prpl is needed because the meaning of the usernames is completely different (there's no srv lookup stuff either)
* jabber: Fixed null deref when receiving <subject> from oneselfdequis2015-04-03-2/+2
| | | | | | | | If the from="..." of the message that includes a subject refers to us, that buddy object won't have an ext_jid set, and passing that to strchr() results in pain. This happens with recent versions of an xmpp server called "lets-chat".
* Fix a bunch of memory leaksdequis2015-03-22-0/+1
| | | | | | | | | | | | | | | | | | | - irc_im.c: - bee_irc_user_msg: strdup leaks when otr swallows messages - bee_irc_user_action_response: GString leak in all ctcp replies - otr.c: - call g_slist_free() on the list of the otr_policy setting - otr_filter_msg_in: call otrl_tlv_free() if "tlvs" are returned - otr_filter_msg_out: don't g_strdup() if the message should be ignored - log_otr_message: g_strdup_vprintf() leaks always - nogaim.c: - imcb_ask_auth/imcb_ask_add: leaks in g_strdup_printf() - imcb_ask_add leaks imcb_ask_cb_data if the user already exists - add imcb_ask_cb_free() to correctly free its data - msn_util.c: add msn_buddy_ask_free(), ditto - storage_xml.c: pass_cr/password if base64_decode or arc_decode fail - ssl_gnutls.c: conn->hostname leak in error conditions, like invalid certs - jabber_util.c: jabber_buddy_by_ext_jid() leaks jid if it's not an ext jid
* Use https:// URL for Facebook OAuth2 now that there's a cert.Wilmer van der Gaast2015-02-24-1/+1
|
* s5bytestream: fix segfault (cleanup before trying next streamhost)dequis2015-02-22-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | This segfault happened when none of the available streamhosts can be connected to - or if at least one of them fails to connect. Before this commit, it can be reproduced reliably by setting the "proxy" setting of the account to nonsense, for example, this is what i used: proxy.example.org,1.2.3.4,7777;proxy.example.com,173.194.42.65,80 jabber_bs_recv_handshake_abort() calls jabber_bs_recv_handshake(), which is supposed to restart the handshake with the next streamhost. And it replaced bt->tf->watch_out, which held an event ID, with a newer event ID. So the replaced event ID doesn't get removed, and it gets called again when its socket is closed by the timeout - and by the time that happens, the memory is free()'d already. Boom. The patch is simple - created jabber_bs_remove_events() to cleanup those events, and use it before any code that expects to restart the cycle. So basically the same as doing b_event_remove(bt->tf->watch_out). I hope there aren't more bugs like this in this code.
* s5bytestream: refactor some copypasted code into functionsdequis2015-02-22-89/+47
| | | | | | | | | - get_ft_by_sid() - generate_pseudoaddr() (also uses g_compute_checksum_for_string() to make the code shorter) - jabber_streamhost_new() Behavior should be the same.
* Reindent everything to K&R style with tabsIndent2015-02-20-3442/+3326
| | | | | | | Used uncrustify, with the configuration file in ./doc/uncrustify.cfg Commit author set to "Indent <please@skip.me>" so that it's easier to skip while doing git blame.
* Use glib's GChecksum for md5/sha1dequis2015-01-31-1/+3
| | | | | | | | | | | | | | | | | | | This changes behavior slightly: - md5_init()/sha1_init() allocate a GChecksum - md5_finish()/sha1_finish() close and free() it - md5_digest_keep() was added (no sha1 equivalent needed) And yes, glib has this concept of "closing" the GChecksum, which means it can't be used anymore after g_checksum_get_digest(). jabber_cache_add() actually seems to need to do that to generate some random-ish values, so i kept that working by adding a md5_digest_keep() function that copies the GChecksum before it gets closed GChecksum was introduced in glib 2.16, so the configure script version was bumped. We were already depending on glib 2.16 accidentally (some post-3.2.2 code uses GHashTableIter)
* jabber: Account-wide display_name setting, for groupchatsdequis2015-01-25-1/+11
| | | | | This sets the default value of 'nick' for newly created groupchats. There is no way to set an account-wide nick.
* Add handle_is_self() prpl function to fix JID mismatch confusion bugsdequis2015-01-25-4/+14
| | | | | | | | | When bee_chat needs to check for self messages, it can call this function to let the protocol implementation do the comparison. In the case of jabber, sometimes the server reports a different username after login, this one is stored in jd->internal_jid, and the one that is used for login isn't changed
* Add jabber_normalize_ext() to fix case sensitivity issues with ext jidsdequis2015-01-16-16/+30
| | | | | | Also refactor jabber_normalize() to be UTF8 aware. See trac ticket 1106 for more details
* Replace isdigit/isalpha/.../tolower/toupper with glib variantsdequis2015-01-16-4/+4
| | | | | | | | | | | This fixes warnings about passing signed chars to them (apparently they are implemented as macros that do array lookups without checks in some platforms, yay) Specifically: functions=isalnum|isalpha|isdigit|isspace|isxdigit|tolower|toupper sed -ir "s/$functions/g_ascii_&/g" **/*.c
* Some more g_source_remove warning fixesdequis2014-10-27-0/+9
| | | | | - http_incoming_data calling itself - jabber_bs_free_transfer calling jabber_si_free_transfer
* Add support for XEP-0203: Delayed delivery (message timestamps)dequis2014-10-10-11/+22
| | | | | | | | Very similar to XEP-0091 which is already supported, but was marked as obsolete, replaced by XEP-0203. The main differences are the tag name and the timestamp format. Due to the similarities, both XEPs are still supported.
* Handle not-authorized stream errors, avoid reconnectdequis2014-10-10-0/+5
| | | | Got this one while trying to connect to google servers with hipchat auth
* Remove MSNXMPP specific codedequis2014-10-10-23/+3
| | | | The MSN XMPP gateway was shutdown december 2013 and isn't coming back.
* One small comment correction while "merging" stuff.Wilmer van der Gaast2014-09-21-1/+1
|
* Added jabber_compare_jid to fix JID comparison case sensitivityGRMrGecko2014-07-24-1/+24
|
* Fix for rejecting buddy requests on jabber (Ticket #887)kevin8t82014-02-27-1/+1
| | | | Patch from ticket #1112
* Fix OAuth2 error reporting.Wilmer van der Gaast2013-05-25-3/+3
|
* Merging "storage" branch which I wrote long ago. It separates generation ofWilmer van der Gaast2013-04-20-1/+1
|\ | | | | | | | | | | XML-formatted user configs from disk I/O so we can try to start using other mechanisms to store them (a REST API or something, for example).
| * s/ACC_SET_NOSAVE/SET_NOSAVE/.Wilmer van der Gaast2012-06-07-1/+1
| |
* | I'm still bored on a long flight. Wrote a script to automatically updateWilmer van der Gaast2013-02-21-7/+7
| | | | | | | | | | | | | | my copyright mentions since some were getting pretty stale. Left files not touched since before 2012 alone so that this change doesn't touch almost EVERY source file.
* | For the lazy among us: When adding a Jabber/MSN contact within the sameWilmer van der Gaast2013-02-21-2/+3
| | | | | | | | | | domain like you, you can omit the domain name.
* | Require StartTLS from all Jabber servers by default, like most clients doWilmer van der Gaast2013-01-06-1/+1
| | | | | | | | | | these days.
* | Fixed minor memory leak in Jabber module.Wilmer van der Gaast2012-12-24-0/+1
| |
* | Improved failure handling in jabber_si_handle_request(). If the imcbWilmer van der Gaast2012-12-18-2/+4
| | | | | | | | | | | | callback fails, we shouldn't try to continue the ft and dereference the NULL ptr it returned.
* | SSL fixes from Michal Suchanek.Wilmer van der Gaast2012-10-30-1/+1
| |
* | Merging XEP-0184 support patch from Michael Stapelberg, #999.Wilmer van der Gaast2012-10-28-0/+24
|\ \
| * | Implement jabber message receipts (XEP-0184)Michael Stapelberg2012-10-17-0/+31
|/ / | | | | | | | | | | | | This change will make BitlBee acknowledge messages when requested. It will not request message receipts from other clients, mainly because I am not sure if this feature can be mapped to IRC cleanly.
* | Handle see-other-host requests from XMPP servers. This should fix MSN/WLMWilmer van der Gaast2012-09-17-0/+31
| | | | | | | | | | XMPP support.