This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "emacs-jabber".
The branch, master has been updated
via 2ada81d8664763700430d3e6aa9ea776e712631a (commit)
from 7df437d1d8beeca967d0372f36862a27f507ffbc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2ada81d8664763700430d3e6aa9ea776e712631a
Author: Magnus Henoch <mag...@gm...>
Date: Tue Sep 23 23:35:28 2014 +0100
Fix error responses to IQs without 'from' or 'id' attributes
If an incoming IQ had no 'from' attribute, and we would try to send an
error response to it, then the response actually sent would have
to='nil', as jabber-sexp2xml converts the 'nil' symbol to an attribute
value, but the XML console would fail to display the response. Avoid
this by omitting the 'to' attribute in this case.
If the incoming IQ had no 'id' attribute, the same would happen: the
response sent on the wire would have id='nil', and the console would
fail to print it. Section 8.3.1 of RFC 6120 says that the id attribute
of the response should be empty if the id attribute in the request was
absent, so let's do that here.
diff --git a/jabber-iq.el b/jabber-iq.el
index 2d8b502..a4a4121 100644
--- a/jabber-iq.el
+++ b/jabber-iq.el
@@ -152,9 +152,9 @@ APP-SPECIFIC is a list of extra XML tags.
See section 9.3 of XMPP Core."
(jabber-send-sexp
jc
- `(iq ((to . ,to)
+ `(iq (,@(when to `((to . ,to)))
(type . "error")
- (id . ,id))
+ (id . ,(or id "")))
,original-query
(error ((type . ,error-type))
(,condition ((xmlns . "urn:ietf:params:xml:ns:xmpp-stanzas")))
-----------------------------------------------------------------------
Summary of changes:
jabber-iq.el | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
emacs-jabber
|