24. September 2009

TwiX - Jabber Twitter Gateway Version 0.4.8

I was spamming my twitter account accidentally. Actually it was my Jabber/Twitter gateway, which got an XMPP error message from a broken jabber server and tweeted the error, then sent me a confirmation, got another error message and tweeted it again. Infinite loop!

The main problem is, that the error message looks very much like a good message. That's a Jabber "feature". A good message looks like:

<message from="JID" to="JID">
If that produces an error, then comes back:
<message from="JID">to="JID"type="error">
  <error code="500" type="wait">
  <internal-server-error xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
...which looks very much like the original message, if you do not check for the type="error" bit and just forward the body to the twitter API.


TwiX has now been updated to version 0.4.8. Get it here.


Keine Kommentare: