libgsasl 1.6.1 changed protocol, PSI+ can no longer connect

Bug #899284 reported by Plague
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Jabberd
Fix Released
High
Tomasz Sterna

Bug Description

As also reported here:
http://lists.gnu.org/archive/html/help-gsasl/2011-08/msg00000.html

libgsasl changed IO protocol: "DIGEST-MD5: The server code now returns GSASL_OK after the final token."
since upgrading libgsasl, PSI+ IM client can no longer connect to the server, by reverting the change everything works.

Although this for me is a breakage in the api/protocol on gsasl side, the fastest and best way to fix the problem is to update jabberd2 to the new protocol, which AFAIK is backwards compatible.

Well read the diff on the site I linked to, it's more comprehensive than my text I think.

I am using Gentoo jabberd2-2.2.4 libgsas-1.6.1 psi 0.14-r4

Revision history for this message
Tomasz Sterna (smoku) wrote :

This is not a problem with jabberd2 code.
It's a problem with some clients, that do not implement SASL properly.

Changed in jabberd2:
status: New → Invalid
Revision history for this message
Plague (4plague) wrote :

Well, I looked at the code and since GSASL changed behavior from reading till the end, the last chunk:
from returning GSASL_NEEDS_MORE and the *next* read returns GSASL_OK
to returning GSASL_OK right away

and you have sasl_gsasl.c:378 versus sasl_gsasl.c:394 where one processes data where the other does not
AND that singe gsasl changed on the server, not client when the communication stopped working, I am still inclined to say that you should test the bug first...

Revision history for this message
Tomasz Sterna (smoku) wrote :

Oh. I guess for Psi receiving <success/> stanza is not enough and it's still waiting for some leftover SASL data.
Although it shouldn't be necessary according to RFC, please try the attached patch that sends the data in the finishing <success/> stanza.

Changed in jabberd2:
assignee: nobody → Plague (4plague)
importance: Undecided → High
status: Invalid → Incomplete
Revision history for this message
Plague (4plague) wrote :

Thanks! After the patch it seems to work with vanilla libgsasl.
Should I post a bugreport on psi or will you? Seeing as you know more about their problem.

Revision history for this message
Tomasz Sterna (smoku) wrote :

I will push the patch to the jabberd2 git then.

Please report the problem to Psi, as I don't even know where to begin. ;-)

Revision history for this message
Tomasz Sterna (smoku) wrote :
Changed in jabberd2:
assignee: Plague (4plague) → Tomasz Sterna (smoku)
status: Incomplete → Fix Committed
Revision history for this message
Tomasz Sterna (smoku) wrote :

Fixed in 2.2.15

Changed in jabberd2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.