From cd51cd6973941e08b854a2b3a56e3c47e5f3c7d9 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 2 Sep 2013 01:32:14 +0000 Subject: [PATCH] If we send an IQ to a server allow "from" to be empty --- 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/wocky/wocky-c2s-porter.c +++ b/wocky/wocky-c2s-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