Bug 787046 - "Not authorized" error when connecting to an OpenFire XMPP server with the correct password, r=clokep,a=Standard8 CLOSED TREE
authorFlorian Qu?ze <florian@queze.net>
Tue, 04 Sep 2012 16:58:32 +0200
changeset 30858 3bccb752ab1c23e6ad4cea525b537a286eab2987
parent 30857 f7ae9cfd45409ea906086112f2b92e123405744c
child 30859 4b52f89a8feca881d0d796bc71e805f26bac03ba
child 30861 1c5afa0e0f36b73b35b50f284a0e4672cb0cc832
child 30862 a40e1fd381390ee414a2b53e40a018ffcd4208f2
push id1
push userclokep@gmail.com
push dateMon, 07 May 2018 22:45:56 +0000
treeherdercomm-esr60@57eacde5ef40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersclokep, Standard8
bugs787046
Bug 787046 - "Not authorized" error when connecting to an OpenFire XMPP server with the correct password, r=clokep,a=Standard8 CLOSED TREE
chat/protocols/xmpp/xmpp-session.jsm
--- a/chat/protocols/xmpp/xmpp-session.jsm
+++ b/chat/protocols/xmpp/xmpp-session.jsm
@@ -291,16 +291,23 @@ XMPPSession.prototype = {
         let errorMsg = "authenticationFailure";
         if (aStanza.getElement(["not-authorized"]))
           errorMsg = "notAuthorized";
         this.onError(Ci.prplIAccount.ERROR_AUTHENTICATION_FAILED,
                      _("connection.error." + errorMsg));
         return;
       }
 
+      // OpenFire sometimes sends us a success stanza before the end
+      // of the DIGEST-MD5 exchange... See bug 787046.
+      if (aStanza && aStanza.localName == "success") {
+        this.stanzaListeners.authResult.call(this, aStanza);
+        return;
+      }
+
       let result;
       try {
         result = this._auth.next(aStanza);
       } catch(e) {
         ERROR(e);
         this.onError(Ci.prplIAccount.ERROR_AUTHENTICATION_FAILED,
                      _("connection.error.authenticationFailure"));
         return;