libgsasl 1.6.1 changed protocol, PSI+ can no longer connect

Bug #899284 reported by Plague on 2011-12-02
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Tomasz Sterna

Bug Description

As also reported here:

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

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
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...

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
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.

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. ;-)

Tomasz Sterna (smoku) wrote :
Changed in jabberd2:
assignee: Plague (4plague) → Tomasz Sterna (smoku)
status: Incomplete → Fix Committed
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  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers