Bug#722098: Bug #722098: telepathy-gabble: Facebook chat authorization error

2013-09-12 Thread Michael Banck
Hi,

On Sun, Sep 08, 2013 at 11:19:21PM +0200, Michael Banck wrote:
> On Sun, Sep 08, 2013 at 10:37:13AM +0100, Simon McVittie wrote:
> > telepathy-gabble 0.18.1 has the same patch and basically no other
> > changes. I'll try to get it uploaded on Monday if nobody gets there first.
> 
> Cool.
> 
> FWIW, I'm attaching a patch which fixes Facebook chat on squeeze as
> well.  

Facebook apparently fixed their XMPP servers, so this is no longer an
issue.


Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#722098: Bug #722098: telepathy-gabble: Facebook chat authorization error

2013-09-09 Thread Michael Banck
Hi,

On Mon, Sep 09, 2013 at 12:05:57PM +0100, Simon McVittie wrote:
> On 08/09/13 22:19, Michael Banck wrote:
> > FWIW, I'm attaching a patch which fixes Facebook chat on squeeze as
> > well.
> 
> -  if (sender != conn->self_handle)
> -{
> -   NODE_DEBUG (iq_node, "discarding roster IQ which is not from "
> -  "ourselves or the server");
> 
> Don't remove this: it's what prevents your contacts from spoofing roster
> updates. It needs to be more targeted, similar to the wocky-porter change.
 
I see, ok.

> I'll get some backports sorted out upstream - please don't upload
> anything for this until it's been through upstream review.

Great!


Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#722098: Bug #722098: telepathy-gabble: Facebook chat authorization error

2013-09-09 Thread Simon McVittie
On 08/09/13 22:19, Michael Banck wrote:
> FWIW, I'm attaching a patch which fixes Facebook chat on squeeze as
> well.

-  if (sender != conn->self_handle)
-{
-   NODE_DEBUG (iq_node, "discarding roster IQ which is not from "
-  "ourselves or the server");

Don't remove this: it's what prevents your contacts from spoofing roster
updates. It needs to be more targeted, similar to the wocky-porter change.

I'll get some backports sorted out upstream - please don't upload
anything for this until it's been through upstream review.

S


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#722098: Bug #722098: telepathy-gabble: Facebook chat authorization error

2013-09-08 Thread Michael Banck
On Sun, Sep 08, 2013 at 10:37:13AM +0100, Simon McVittie wrote:
> telepathy-gabble 0.18.1 has the same patch and basically no other
> changes. I'll try to get it uploaded on Monday if nobody gets there first.

Cool.

FWIW, I'm attaching a patch which fixes Facebook chat on squeeze as
well.  There, a further patch is required (taken from 0ca8f572) to make
gabble not discard the roster sent by the Facebook XMPP (resulting in no
contacts being displayed).  Not sure this warrants a seperate bug as it
appears to be due to the same root cause, but I think stable/oldstable
uploads are in order to fix this.


Michael
commit c4e19a478599d12824dddcba83de907fa8adf310
Author: Xavier Claessens 
Date:   Tue Oct 25 16:44:36 2011 +0200

Accept from="server.com" as stanzas coming from server

Some servers does not set the full/bare jid.

Fixes fdo#39057

diff --git a/tests/wocky-porter-test.c b/tests/wocky-porter-test.c
index ca64f0f..08e9d4d 100644
diff --git a/wocky/wocky-c2s-porter.c b/wocky/wocky-c2s-porter.c
index 52ee2f9..713df5a 100644
--- a/lib/ext/wocky/wocky/wocky-porter.c
+++ b/lib/ext/wocky/wocky/wocky-porter.c
@@ -76,6 +76,7 @@ struct _WockyC2SPorterPrivate
   gchar *full_jid;
   gchar *bare_jid;
   gchar *resource;
+  gchar *domain;
 
   /* Queue of (sending_queue_elem *) */
   GQueue *sending_queue;
@@ -361,7 +362,7 @@ wocky_c2s_porter_set_property (GObject *object,
 
   switch (property_id)
 {
-  gchar *node, *domain;
+  gchar *node;
 
   case PROP_CONNECTION:
 g_assert (priv->connection == NULL);
@@ -376,10 +377,9 @@ wocky_c2s_porter_set_property (GObject *object,
 
 priv->full_jid = g_value_dup_string (value);
 g_assert (priv->full_jid != NULL);
-wocky_decode_jid (priv->full_jid, &node, &domain, &priv->resource);
-priv->bare_jid = wocky_compose_jid (node, domain, NULL);
+wocky_decode_jid (priv->full_jid, &node, &priv->domain, &priv->resource);
+priv->bare_jid = wocky_compose_jid (node, priv->domain, NULL);
 g_free (node);
-g_free (domain);
 break;
 
   default:
@@ -844,7 +846,7 @@ check_spoofing (WockyC2SPorter *self,
 goto finally;
 
   /* if we sent an IQ without a 'to' attribute, it's to our server: allow it
-   * to use our full or bare JID to reply */
+   * to use our full/bare JID or domain to reply */
   if (should_be_from == NULL)
 {
   if (stanza_is_from_server (self, nfrom))
>From cd51cd6973941e08b854a2b3a56e3c47e5f3c7d9 Mon Sep 17 00:00:00 2001
From: David Edmundson 
Date: Mon, 2 Sep 2013 01:32:14 +
Subject: [PATCH] If we send an IQ to a server allow "from" to be empty

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68829
Origin: upstream, 0.18.1
---
 wocky/wocky-c2s-porter.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/wocky/wocky-c2s-porter.c b/wocky/wocky-c2s-porter.c
index 8f0daa0..02c46cd 100644
--- a/lib/ext/wocky/wocky/wocky-porter.c
+++ b/lib/ext/wocky/wocky/wocky-porter.c
@@ -859,6 +859,16 @@ check_spoofing (WockyC2SPorter *self,
 goto finally;
 }
 
+  /* If we sent an IQ to the server itself, allow it to
+   * omit 'from' in its reply, which is normally used
+   * for messages from the server on behalf of our own
+   * account (as of 2013-09-02, the Facebook beta server
+   * does this). See fd.o #68829 */
+
+  if (from == NULL && !wocky_strdiff (should_be_from, self->priv->domain)) {
+  goto finally;
+  }
+
   /* if we sent an IQ to our full or bare JID, allow our server to omit 'to'
* in the reply (Prosody 0.6.1 does this with the resulting error if we
* send disco#info to our own bare JID), or to use our full JID. */
-- 
1.8.3.4

--- ./src/roster.c.orig	2013-09-08 15:06:04.487098988 +0200
+++ ./src/roster.c	2013-09-08 15:06:40.820177614 +0200
@@ -1579,23 +1579,6 @@
   if (query_node == NULL)
 return LM_HANDLER_RESULT_ALLOW_MORE_HANDLERS;
 
-  from = lm_message_node_get_attribute (
-  wocky_stanza_get_top_node (message), "from");
-
-  if (from != NULL)
-{
-  TpHandle sender;
-
-  sender = tp_handle_lookup (contact_repo, from, NULL, NULL);
-
-  if (sender != conn->self_handle)
-{
-   NODE_DEBUG (iq_node, "discarding roster IQ which is not from "
-  "ourselves or the server");
-  return LM_HANDLER_RESULT_REMOVE_MESSAGE;
-}
-}
-
   sub_type = lm_message_get_sub_type (message);
 
   /* if this is a result, it's from our initial query. if it's a set,


Bug#722098: Bug #722098: telepathy-gabble: Facebook chat authorization error

2013-09-08 Thread Simon McVittie
tags 722098 + fixed-upstream
thanks

telepathy-gabble 0.18.1 has the same patch and basically no other
changes. I'll try to get it uploaded on Monday if nobody gets there first.

S


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#722098: Bug #722098: telepathy-gabble: Facebook chat authorization error

2013-09-08 Thread Michael Banck
Dear Wayne,

On Sat, Sep 07, 2013 at 10:49:33PM -0500, Wayne Rowcliffe wrote:
> The new package seems to have fixed the issue. I'll let you know if it acts
> up.

Thanks for testing!


Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#722098: Bug #722098: telepathy-gabble: Facebook chat authorization error

2013-09-07 Thread Michael Banck
Hi,

On Wed, Sep 04, 2013 at 07:00:21PM -0500, Wayne Rowcliffe wrote:
> Dear Maintainer,
> 
>* What led up to the situation?
>   Facebook chat has been acting weird for a couple weeks now.
>   Previously it would replace the users' names with what I assume
>   are their jabber ids.

This was a known problem, and there is an initial patch in
https://bugs.freedesktop.org/show_bug.cgi?id=68143

However, I have to say I couldn't reproduce it after fixing the
connection error.  I've uploaded a patched package to
http://people.debian.org/~mbanck/telepathy-gabble_0.18.0-1.1_amd64.deb
maybe you can see whether you can still reproduce the disappearing User
names issue with this, as well as whether it fixes the authorization
error.


Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org