码迷,mamicode.com
首页 > 其他好文 > 详细

XMPP getting "Not Authorized" when joining an P/W protected, already open chat room

时间:2015-04-30 20:28:08      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:situation   criteria   password   network   specific   

When a XMPP password protected room is already set up in a window, and the account is logged back in, Pidgin tries to log into the room without a password and fails with a "Not Authorized" error. Double-clicking on the room in the Buddy List will log into the room properly.

This bug seems to crop up on a specific set of criteria, but given that the situation happens often (at least for me), it is still annoying. I hiberate my laptop often and go on VPN, so it comes up every time the network is re-connected.

Steps to Reproduce (100% reproducible on my side):

1. Log into password-protected XMPP chat room.
2. Keep room window open.
3. Disable account or disconnect Internet connection
4. Enable account or re-connect Internet connection
5. Error occurs when Pidgin attempts to relog into room.

Relevant debug lines (with added line breaks):

(09:23:23) jabber: Sending (ssl) (sineswiper@foobar.com/spark): <presence to=‘secretroom@chat.foobar.com/sineswiper‘>
<priority>1</priority><c xmlns=‘http://jabber.org/protocol/caps‘ node=‘http://pidgin.im/‘ hash=‘sha-1‘ 
ver=‘I22W7CegORwdbnu0ZiQwGpxr0Go=‘/><x xmlns=‘http://jabber.org/protocol/muc‘/></presence>
(09:23:23) jabber: Recv (ssl)(393): <presence to="sineswiper@foobar.com/spark" 
from="secretroom@chat.foobar.com/sineswiper" type="error"><priority>1</priority><c xmlns="http://jabber.org/protocol/caps" 
node="http://pidgin.im/" hash="sha-1" ver="I22W7CegORwdbnu0ZiQwGpxr0Go="/><x xmlns="http://jabber.org
/protocol/muc"/><error code="401" type="auth"><not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></presence>
...
(09:23:53) gtkconv: setting active conversation on toolbar 0A3EE998
(09:23:53) jabber: Sending (ssl) (sineswiper@foobar.com/spark): <presence to=‘secretroom@chat.foobar.com/sineswiper‘>
<priority>1</priority><c xmlns=‘http://jabber.org/protocol/caps‘ node=‘http://pidgin.im/‘ hash=‘sha-1‘ 
ver=‘I22W7CegORwdbnu0ZiQwGpxr0Go=‘/><x xmlns=‘http://jabber.org/protocol/muc‘><password>password</password></x></presence>
(09:23:53) jabber: Recv (ssl)(419): <presence to="sineswiper@foobar.com/spark" 
from="secretroom@chat.foobar.com/mrsadmin"><priority>1</priority><c xmlns="http://jabber.org/protocol/caps" node="http://pidgin.im/" 
hash="sha-1" ver="I22W7CegORwdbnu0ZiQwGpxr0Go="/><x xmlns="vcard-temp:x:update"><photo/></x><x xmlns="http://jabber.org/protocol
/muc#user"><item jid="mrsadmin@foobar.com/1d4c2a8e" affiliation="owner" role="moderator"/></x></presence>
(09:23:53) jabber: Sending (ssl) (sineswiper@foobar.com/spark): <iq type=‘get‘ id=‘purple93a1b4dc‘ to=‘secretroom@chat.foobar.com‘><query 
xmlns=‘http://jabber.org/protocol/disco#info‘ node=‘http://jabber.org/protocol/muc#traffic‘/></iq>
(09:23:53) jabber: Recv (ssl)(462): <presence to="sineswiper@foobar.com/spark" 
from="secretroom@chat.foobar.com/normaluser1"><priority>1</priority><query xmlns="jabber:iq:last" seconds="300"/><c 
xmlns="http://jabber.org/protocol/caps" node="http://pidgin.im/" hash="sha-1" ver="I22W7CegORwdbnu0ZiQwGpxr0Go="/><x xmlns="vcard-
temp:x:update"><photo/></x><x xmlns="http://jabber.org/protocol/muc#user"><item jid="normaluser1@foobar.com/spark" 
affiliation="none" role="participant"/></x></presence>
...

Note the difference between the two presence requests. The first one does not send out a password via XML, and the second one does (which was the manual double-click into the room). So, Pidgin is clearly not sending the password out when it should.


本文出自 “Cantgis” 博客,谢绝转载!

XMPP getting "Not Authorized" when joining an P/W protected, already open chat room

标签:situation   criteria   password   network   specific   

原文地址:http://cantgis.blog.51cto.com/5788192/1640880

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!