diff -Nru bitlbee-3.4.1/configure bitlbee-3.4.1/configure --- bitlbee-3.4.1/configure 2015-06-16 22:30:40.000000000 +0000 +++ bitlbee-3.4.1/configure 2015-11-01 05:24:37.000000000 +0000 @@ -50,8 +50,8 @@ pie=1 -arch=`uname -s` -cpu=`uname -m` +arch=$(uname -s) +cpu=$(uname -m) GLIB_MIN_VERSION=2.16 @@ -102,7 +102,7 @@ echo BitlBee configure while [ -n "$1" ]; do - e="`expr "X$1" : 'X--\(.*=.*\)'`" + e="$(expr "X$1" : 'X--\(.*=.*\)')" if [ -z "$e" ]; then cat< /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then if $PKG_CONFIG glib-2.0 --atleast-version=$GLIB_MIN_VERSION; then cat<>Makefile.settings -EFLAGS+=`$PKG_CONFIG --libs glib-2.0 gmodule-2.0` -CFLAGS+=`$PKG_CONFIG --cflags glib-2.0 gmodule-2.0` +EFLAGS+=$($PKG_CONFIG --libs glib-2.0 gmodule-2.0) +CFLAGS+=$($PKG_CONFIG --cflags glib-2.0 gmodule-2.0) EOF else echo - echo 'Found glib2 '`$PKG_CONFIG glib-2.0 --modversion`', but version '$GLIB_MIN_VERSION' or newer is required.' + echo 'Found glib2 '$($PKG_CONFIG glib-2.0 --modversion)', but version '$GLIB_MIN_VERSION' or newer is required.' exit 1 fi else @@ -348,8 +348,8 @@ { if $PKG_CONFIG --exists gnutls; then cat <>Makefile.settings -EFLAGS+=`$PKG_CONFIG --libs gnutls` `libgcrypt-config --libs` -CFLAGS+=`$PKG_CONFIG --cflags gnutls` `libgcrypt-config --cflags` +EFLAGS+=$($PKG_CONFIG --libs gnutls) $(libgcrypt-config --libs) +CFLAGS+=$($PKG_CONFIG --cflags gnutls) $(libgcrypt-config --cflags) EOF ssl=gnutls if ! pkg-config gnutls --atleast-version=2.8; then @@ -359,8 +359,8 @@ ret=1 elif libgnutls-config --version > /dev/null 2> /dev/null; then cat <>Makefile.settings -EFLAGS+=`libgnutls-config --libs` `libgcrypt-config --libs` -CFLAGS+=`libgnutls-config --cflags` `libgcrypt-config --cflags` +EFLAGS+=$(libgnutls-config --libs) $(libgcrypt-config --libs) +CFLAGS+=$(libgnutls-config --cflags) $(libgcrypt-config --cflags) EOF ssl=gnutls @@ -374,8 +374,8 @@ { if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG nss; then cat<>Makefile.settings -EFLAGS+=`$PKG_CONFIG --libs nss` -CFLAGS+=`$PKG_CONFIG --cflags nss` +EFLAGS+=$($PKG_CONFIG --libs nss) +CFLAGS+=$($PKG_CONFIG --cflags nss) EOF ssl=nss @@ -620,7 +620,7 @@ if [ -z "$systemdsystemunitdir" ]; then if $PKG_CONFIG --exists systemd; then - systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd` + systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) fi fi if [ -n "$systemdsystemunitdir" ]; then diff -Nru bitlbee-3.4.1/debian/bzr-builder.manifest bitlbee-3.4.1/debian/bzr-builder.manifest --- bitlbee-3.4.1/debian/bzr-builder.manifest 1970-01-01 00:00:00.000000000 +0000 +++ bitlbee-3.4.1/debian/bzr-builder.manifest 2015-11-01 05:24:38.000000000 +0000 @@ -0,0 +1,2 @@ +# bzr-builder format 0.3 deb-version {debupstream}-0~1198 +lp:~gpolitis/bitlbee/releases revid:git-v1:e11216ce7cfdd8092e724e824b04f2bee0a7e41b diff -Nru bitlbee-3.4.1/debian/changelog bitlbee-3.4.1/debian/changelog --- bitlbee-3.4.1/debian/changelog 2015-11-01 05:26:19.000000000 +0000 +++ bitlbee-3.4.1/debian/changelog 2015-11-01 05:24:38.000000000 +0000 @@ -1,3 +1,9 @@ +bitlbee (3.4.1-0~1198~ubuntu16.04.1) xenial; urgency=low + + * Auto build. + + -- George Politis Sun, 01 Nov 2015 05:24:38 +0000 + bitlbee (3.4.1-1) unstable; urgency=medium * Fix copyright info (Closes: #764181) diff -Nru bitlbee-3.4.1/doc/user-guide/commands.xml bitlbee-3.4.1/doc/user-guide/commands.xml --- bitlbee-3.4.1/doc/user-guide/commands.xml 2015-06-16 22:30:40.000000000 +0000 +++ bitlbee-3.4.1/doc/user-guide/commands.xml 2015-11-01 05:24:37.000000000 +0000 @@ -1185,6 +1185,21 @@ + + false + + + + This enables SASL ANONYMOUS login for jabber accounts, as specified by XEP-0175. + + + + With this setting enabled, if the server allows this method, a password isn't required and the username part of the JID is ignored (you can use anonymous@jabber.example.com). Servers will usually assign you a random numeric username instead. + + + + + both both, root, user, none diff -Nru bitlbee-3.4.1/irc_channel.c bitlbee-3.4.1/irc_channel.c --- bitlbee-3.4.1/irc_channel.c 2015-06-16 22:30:40.000000000 +0000 +++ bitlbee-3.4.1/irc_channel.c 2015-11-01 05:24:37.000000000 +0000 @@ -444,10 +444,10 @@ can only auto-join them if their account is online. */ char *acc_s; - if (!aj || (ic->flags & IRC_CHANNEL_JOINED)) { - /* Only continue if this one's marked as auto_join - or if we're in it already. (Possible if the - client auto-rejoined it before identyfing.) */ + if (!aj && !(ic->flags & IRC_CHANNEL_JOINED)) { + /* Only proceed if this one's marked as auto_join + or if we're in it already. (Very likely the IRC + client auto-(re)joining at reconnect time.) */ continue; } else if (!(acc_s = set_getstr(&ic->set, "account"))) { continue; diff -Nru bitlbee-3.4.1/irc_im.c bitlbee-3.4.1/irc_im.c --- bitlbee-3.4.1/irc_im.c 2015-06-16 22:30:40.000000000 +0000 +++ bitlbee-3.4.1/irc_im.c 2015-11-01 05:24:37.000000000 +0000 @@ -835,7 +835,8 @@ if ((acc_s = set_getstr(&ic->set, "account")) && (room = set_getstr(&ic->set, "room")) && (acc = account_get(ic->irc->b, acc_s)) && - acc->ic && acc->prpl->chat_join) { + acc->ic && (acc->ic->flags & OPT_LOGGED_IN) && + acc->prpl->chat_join) { char *nick; if (!(nick = set_getstr(&ic->set, "nick"))) { diff -Nru bitlbee-3.4.1/lib/json.c bitlbee-3.4.1/lib/json.c --- bitlbee-3.4.1/lib/json.c 2015-06-16 22:30:40.000000000 +0000 +++ bitlbee-3.4.1/lib/json.c 2015-11-01 05:24:37.000000000 +0000 @@ -508,7 +508,7 @@ case ']': - if (top->type == json_array) { + if (top && top->type == json_array) { flags = (flags & ~(flag_need_comma | flag_seek_value)) | flag_next; } else { sprintf(error, "%d:%d: Unexpected ]", cur_line, e_off); goto e_failed; } diff -Nru bitlbee-3.4.1/protocols/jabber/jabber.c bitlbee-3.4.1/protocols/jabber/jabber.c --- bitlbee-3.4.1/protocols/jabber/jabber.c 2015-06-16 22:30:40.000000000 +0000 +++ bitlbee-3.4.1/protocols/jabber/jabber.c 2015-11-01 05:24:37.000000000 +0000 @@ -84,7 +84,10 @@ if (strcmp(acc->prpl->name, "hipchat") == 0) { set_setstr(&acc->set, "server", "chat.hipchat.com"); } else { - s = set_add(&acc->set, "oauth", "false", set_eval_oauth, acc); + set_add(&acc->set, "oauth", "false", set_eval_oauth, acc); + + /* this reuses set_eval_oauth, which clears the password */ + set_add(&acc->set, "anonymous", "false", set_eval_oauth, acc); } s = set_add(&acc->set, "ssl", "false", set_eval_bool, acc); diff -Nru bitlbee-3.4.1/protocols/jabber/s5bytestream.c bitlbee-3.4.1/protocols/jabber/s5bytestream.c --- bitlbee-3.4.1/protocols/jabber/s5bytestream.c 2015-06-16 22:30:40.000000000 +0000 +++ bitlbee-3.4.1/protocols/jabber/s5bytestream.c 2015-11-01 05:24:37.000000000 +0000 @@ -84,7 +84,7 @@ if ((op) == -1) { \ return jabber_bs_abort(bt, msg ": %s", strerror(errno)); } -gboolean jabber_bs_abort(struct bs_transfer *bt, char *format, ...); +gboolean jabber_bs_abort(struct bs_transfer *bt, char *format, ...) G_GNUC_PRINTF(2, 3); void jabber_bs_canceled(file_transfer_t *ft, char *reason); void jabber_bs_free_transfer(file_transfer_t *ft); gboolean jabber_bs_connect_timeout(gpointer data, gint fd, b_input_condition cond); diff -Nru bitlbee-3.4.1/protocols/jabber/sasl.c bitlbee-3.4.1/protocols/jabber/sasl.c --- bitlbee-3.4.1/protocols/jabber/sasl.c 2015-06-16 22:30:40.000000000 +0000 +++ bitlbee-3.4.1/protocols/jabber/sasl.c 2015-11-01 05:24:37.000000000 +0000 @@ -53,8 +53,8 @@ struct jabber_data *jd = ic->proto_data; struct xt_node *c, *reply; char *s; - int sup_plain = 0, sup_digest = 0, sup_gtalk = 0, sup_fb = 0; - int want_oauth = FALSE, want_hipchat = FALSE; + int sup_plain = 0, sup_digest = 0, sup_gtalk = 0, sup_fb = 0, sup_anonymous = 0; + int want_oauth = FALSE, want_hipchat = FALSE, want_anonymous = FALSE; GString *mechs; if (!sasl_supported(ic)) { @@ -73,6 +73,7 @@ return XT_ABORT; } + want_anonymous = set_getbool(&ic->acc->set, "anonymous"); want_oauth = set_getbool(&ic->acc->set, "oauth"); want_hipchat = (jd->flags & JFLAG_HIPCHAT); @@ -83,6 +84,8 @@ sup_plain = 1; } else if (c->text && g_strcasecmp(c->text, "DIGEST-MD5") == 0) { sup_digest = 1; + } else if (c->text && g_strcasecmp(c->text, "ANONYMOUS") == 0) { + sup_anonymous = 1; } else if (c->text && g_strcasecmp(c->text, "X-OAUTH2") == 0) { sup_gtalk = 1; } else if (c->text && g_strcasecmp(c->text, "X-FACEBOOK-PLATFORM") == 0) { @@ -141,7 +144,20 @@ imc_logout(ic, FALSE); xt_free_node(reply); return XT_ABORT; - } else if (sup_digest) { + } else if (want_anonymous && sup_anonymous) { + xt_add_attr(reply, "mechanism", "ANONYMOUS"); + + /* Well, that was easy. */ + } else if (want_anonymous) { + imcb_error(ic, "Anonymous login requested, but not supported by server"); + imc_logout(ic, FALSE); + xt_free_node(reply); + return XT_ABORT; + } else if (sup_digest && !(jd->ssl && sup_plain)) { + /* Only try DIGEST-MD5 if there's no SSL/TLS or if PLAIN isn't supported. + * 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) */ + xt_add_attr(reply, "mechanism", "DIGEST-MD5"); /* The rest will be done later, when we receive a . */ diff -Nru bitlbee-3.4.1/protocols/skype/.bzrignore bitlbee-3.4.1/protocols/skype/.bzrignore --- bitlbee-3.4.1/protocols/skype/.bzrignore 2015-06-16 22:30:40.000000000 +0000 +++ bitlbee-3.4.1/protocols/skype/.bzrignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -Changelog -HEADER.html -*.gz -*.asc -.htaccess -shot -*.swp -aclocal.m4 -autom4te.cache -config.log -config.mak -config.status -configure -etc -install-sh -skype.so -skyped.conf -skyped.conf.dist -skype.dylib*